我有一个x86 Visual Studio解决方案,其中包含许多项目文件.一些DLL被设计为用作用户系统上其他应用程序的插件.我们正在扩展一些DLL,以便能够支持64位应用程序.我想要做的是设置解决方案/项目,以便只需点击"Build"就可以构建这些DLL的x86和x64版本.该解决方案包含C++和C#项目.我意识到"批量构建"能够构建两者,但如果开发人员只需单击与之前相同的按钮并生成所有输出DLL,则会更方便.
这是我尝试过的一些测试项目的一些修改,但还没有开始工作:
我试过修改<Target Name="AfterBuild">试试:
<Target Name="AfterBuild" Condition=" '$(Platform)' == 'x86' ">
<PropertyGroup>
<Platform>x64</Platform>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<CallTarget Targets="Build"/>
</Target>
Run Code Online (Sandbox Code Playgroud)
但这会导致以下错误:
C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(565,5): error MSB4006: There is a circular dependency in the target dependency graph involving target "Build".
我认为我的条件会阻止无限递归,但我理解MSBuild如何看不到它.
我也尝试过:
<Project DefaultTargets="MyBuild86;MyBuild64" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
...
<Target Name="MyBuild86">
<PropertyGroup>
<Platform>x86</Platform>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<CallTarget Targets="Build"/>
</Target>
<Target Name="MyBuild64">
<PropertyGroup>
<Platform>x64</Platform>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<CallTarget Targets="Build"/>
</Target>
Run Code Online (Sandbox Code Playgroud)
但我DefaultTargets似乎在Visual Studio IDE中被忽略了.
最后,我尝试创建一个导入第一个项目的单独项目:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" …Run Code Online (Sandbox Code Playgroud) 我有一个dll"mytest.dll",当加载via时LoadLibrary(),返回NULL(和127作为GetLastError()).如果我在"mytest.dll"上使用DependencyWalker,它会报告它应该正确加载并且正确找到所有DLL.在主机exe上运行DependencyWalker的探查器选项为我提供了日志中的相关部分:
00:00:55.099: Loaded "mytest.DLL" at address 0x07860000 by thread 0xBBC. Successfully hooked module.
00:00:55.115: First chance exception 0xC0000139 (DLL Not Found) occurred in "NTDLL.DLL" at address 0x76E24285 by thread 0xBBC.
00:00:55.115: Unloaded "mytest.DLL" at address 0x07860000 by thread 0xBBC.
00:00:55.115: LoadLibraryW("mytest.dll") returned NULL by thread 0xBBC. Error: The specified procedure could not be found (127).
有没有办法调试这个来找出NTDLL.DLL报告试图查找的DLL Not Found消息?或者我应该在其他地方寻找问题的根源?
请注意,从另一个应用程序加载相同的"mytest.DLL"似乎正常工作.
我有一组数据,我想以这种方式通过WPF ListView呈现:
Column1 Column2 Column3 --GroupName1-- Item1 part2 part3 Item2 part2 part3 --GroupName2-- Item3 part2 part3 Item4 long_text_in_both_columns Item5 part2 part3 --GroupName1-- Item6 part2 part3 Item7 long_text_in_both_columns --GroupName3-- Item8 part2 part3
我开始使用这个基本示例:http://msdn.microsoft.com/en-us/library/ms771309(VS.90).aspx
上面的Item4和Item7有长文本,我想跨越剩余的列(忽略原始列标题的用途).我怎样才能做到这一点?
我已经使用DataTrigger进行了一些XAML设置,以使用自定义TextBlock替换默认的GridViewRowPresenter,但这并不是我想要的.我需要正常显示第1列中的数据并识别第一列的宽度.
我正在开发一种使用拉姆风格的三张牌的纸牌游戏.从随机选择的卡片中,我需要算法来挑选哪些卡片能够获得最高数量的卡片.
通过"拉米式三件套"我的意思是:
例如,给定卡片:6D,7D,7C,7H,8D,8C,9C,10H
我可以形成一组:{7D,7C,7H},但这将是我唯一可以摆脱的一套,这不是最佳的.
在这种情况下,最佳集合为:{{6D,7D,8D},{7C,8C,9C}}
我已经尝试过蛮力(通过所有给定的卡进行置换,看看在排列中按顺序匹配的是什么),但事实证明这太慢了.问题感觉它与其他已解决的问题有相似之处,这就是我在这里问的原因.