msbuild

Multibyte MFC Library for Visual Studio 2013

霸气de小男生 提交于 2020-02-26 07:21:21
关于Visual Studio 2013 编译 multi-byte character set MFC程序出现 MSB8031 错误的解决办法 错误 1 error MSB8031: Building an MFC project for a non-Unicode character set is deprecated. You must change the project property to Unicode or download an additional library. See http://go.microsoft.com/fwlink/p/?LinkId=286820 for more information. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets 369 5 JSSTGATEDEMO 原来vsmulti-byte character set 支持移除了 MFC support for MBCS deprecated in Visual Studio 2013 去微软网站下载这个组件,安装就可以: https://www.microsoft.com/zh-cn/download/details.aspx?id=40770 来源:

Visual Studio 2015 not detecting v141 (2017) Build tools

安稳与你 提交于 2020-02-26 06:56:27
问题 I have Windows 10 x64 with installed latest Visual Studio 2015. I needed v141 build tools so I downloaded and installed Visual Studio 2017 C++ Build tools. Anyway the the IDE still showing only v140 in Platform Toolset listbox in project settings. I checked if it's installed and it's contains core tools, mstools and tools v141. 回答1: Visual Studio 2015 not detecting v141 (2017) Build tools Platform Toolset V141 is from Visual Studio 15 2017 not Visual Studio 14 2015. Basically, the software is

“即使平台相同,也试图加载格式不正确的程序”

帅比萌擦擦* 提交于 2020-02-26 01:17:44
我在64位系统上调用32位非托管DLL的函数。 我得到的是: BadImageFormatException:尝试加载格式不正确的程序。 (HRESULT异常:0x8007000B) 起初,我将我的项目设置为Any CPU平台,因此我将它们都更改为x86,但此错误仍在发生。 这真的是我所知道的唯一解决方案。 DLL没有损坏或任何东西,因为我可以将它们与其他程序一起使用(我没有源代码)。 我想也许它没有找到依赖,但我检查了,他们都在那里。 另外,在这种情况下不会抛出 DllNotFoundException 吗? 我还可以做些什么? 在您说“使用64位非托管DLL”之前,让我指出没有一个。 ;) #1楼 这篇文章有点偏离主题,但搜索此错误消息将我带到了这里。 如果您正在通过团队系统构建并获得此错误,则构建定义过程选项卡具有“MSBuild平台”设置。 如果将其设置为“自动”,则可能会遇到此问题。 将其更改为“X86”也可以解决错误。 #2楼 在我的情况下,我在C#中使用本机DLL。 此DLL依赖于其他几个缺失的DLL。 一旦添加了其他DLL,一切正常。 #3楼 我用“Windows”方式解决了这个问题。 检查完所有设置,清理解决方案并重建后,我只需关闭解决方案并重新打开即可。 然后它工作,所以VS可能没有在清洁过程中摆脱一些东西。 当逻辑解决方案不起作用时,我通常会转向不合逻辑的

MSBuild - Jenkins - Nuget integration

不打扰是莪最后的温柔 提交于 2020-02-22 08:49:43
问题 We are experiencing some weird behavior using Jenkins and MSBuild. When manually typing into a command line to build a build.xml project: msbuild build.xml /T:Package /P:PublishProfile=Test /P:Platform="AnyCPU" /P:VisualStudioVersion=12.0 The build process works exactly as expected (build, packaging, etc.) However, if I am using Jenkins to do exactly this - that is - open a command line and run this exact command, I get an error saying: The command ""..\.nuget\NuGet.exe" install "C:\Jenkins

Suppressing the StyleCop Warnings at the global level

荒凉一梦 提交于 2020-02-21 11:21:10
问题 How to suppress the StyleCop warnings globally in the solution? The solution is continually built using Jenkins (continuous build and integration tool), and it applies all the StyleCop rules. The solution uses TAB character instead of 4 spaces as it is the standard taken by my dev team. Because of this, several SA1027 warnings are thrown by StlyeCop. How do I remove SA1027 warning from Jenkins? That would also help. Giving the SuppressMessage on every C# file would not look nice. That's why I

Passing /highentropyva- to CSC compiler from MSBuild command-line or project file

可紊 提交于 2020-02-20 06:16:50
问题 I need to compile my C# application with high entropy VA turned off due to a vendor library incompatibility. The only way I've found to do it so far is a post-build step with editbin, but that's quite clunky. Is there a better way? 回答1: The IDE is missing support for this option in the Build property sheet. But that's easy to work around, you can simply add the property to the .csproj file by hand. Open it in a text editor, Notepad is fine. Locate the <FileAlignment> property and add after it

MSBuild ProjectReference:private (“Copy Local”) - what are the allowed values and behaviour?

拈花ヽ惹草 提交于 2020-02-17 08:04:11
问题 TL;DR Is there any official documentation that describes in detail how the <private> / "Copy Local" option works with MSBuild ? And what values are supposed to go into it? When you add a project reference from one project in Visual Studio to another, it will add a <ProjectReference Include=".....csproj"> to the .csproj MSBuild file. When you add a file reference from one project in Visual Studio to an assembly file in the file system, it will add a <Reference Include="Foo"> <HintPath>....Foo

Specify assembly version number as a command line argument in MSBuild

╄→гoц情女王★ 提交于 2020-02-12 07:51:12
问题 I would like to be able to specify the version number for all assemblies to be generated during a build as a MSBuild command argument like this: MSBuild.exe /p:version=5.4.3.0 I have looked over AssemblyInfoTask but it does not seem to me like a good solution in this case. 回答1: I use the AssemblyInfo task as you describe in your comment all the time. <!-- update standard assembly attribute in all projects --> <Target Name="BeforeBuild" > <Message Text="Updating AssemblyInfo to Version $

Windows Server配置Jenkins,实现监测SVN提交自动构建.net4.5的项目

血红的双手。 提交于 2020-02-11 05:09:56
1,持续集成 概念: http://baike.baidu.com/view/5253255.htm ,对于大多数人而言,自动构建/自动测试/自动部署,已经很发挥它的价值了。选择上: 推荐 jenkins ,一是它比较常见,二是它能跑在windows服务器上 CruiseControl有 .net的版本 ,一进其官网看见醒目的文档过期提示,我就没有尝试的欲望了 gitlab ci 的web界面清爽(比jenkins好看),但是只能跑在linux上,感兴趣的同学去试验吧,所以本文是讲的jenkins。 2,msbuild 了解 msbuild msdn 上的一点一滴的起步 或者 这篇文章 也是个不错的入门 当然,你也可以走点歪门邪道, 直接用sln文件生成msbuild文件 set MSBuildEmitSolution=1 msbuild <<your project>>.sln 注意: 此种情况下生成的msbuild文件只适用于本机,也就是说,它定义了一堆路径,全是你开发机器上的,同时解决方案里所有项目的属性都是一个一个配置的,不是用的变量,如果要修改的话只有批量替换。 其次,如果需要输出到其它目录,或是别的定制的需求,想绕过msbuild的学习应该是不行的 3,jenkins 下载jenkins,执行安装包里的install.exe,安装好后目标服务器的8080端口即可访问

How do I specify the platform for MSBuild?

亡梦爱人 提交于 2020-02-09 06:33:50
问题 I am trying to use MSBuild to build a solution with a specified target platform (I need both binaries, x86 and x64). This is how I tried it: C:\WINDOWS\Microsoft.NET\Framework\v3.5>MsBuild SolutionPath\Solution.sln /t:Rebuild /p:Configuration=Release /p:Platform="x86" However the build always fails if the platform is different from "Any CPU". What am I doing wrong? This is the while output MSBuild prints: C:\WINDOWS\Microsoft.NET\Framework\v3.5>MsBuild SolutionPath\Solution.sln /t:Rebuild /p