msbuild

How do I suppress this COM Generics warning?

心不动则不痛 提交于 2019-12-12 11:25:17
问题 I'm compiling a VB.Net 2.0 app (created in VS2008) using msbuild, and now I've added a generic return type, it's giving me the following: Warning: Type library exporter encountered a generic type instance in a signature. Generic code may not be exported to COM. Having just spent ages removing all of the previous warnings, I don't really want to add a new one. Any idea how to get rid of it (aside from not using generics)? I don't know what details I'd put in the attribute, or what number to

VS 2012 .user file causes unnecessary builds

跟風遠走 提交于 2019-12-12 11:22:57
问题 There are a number of post in relation to Visual Studio building projects when not necessary. However, none seem to cover this particular issue. I'm running Visual Studio 2012 Professional Update 4. In my solution, I have a unit test project that has a project reference to a BizTalk Transforms project. This in-turn has a project reference to a BizTalk schemas project. Every time I choose to run a unit test, the whole solution is built, even though no changes have been made. The first line

msbuild copy files

扶醉桌前 提交于 2019-12-12 11:22:41
问题 I am having trouble copying files with MSbuild and the error messages I'm getting seem to contradict each other (using TFS 2008 to do the build). I currently having the following in my build script <PropertyGroup> <ReleaseRoot>$(DropLocation)\Latest\x86\Release</ReleaseRoot> <WebRoot>$(ReleaseRoot)\_PublishedWebsites\Web</WebRoot> <DBRoot>$(ReleaseRoot)\Database</DBRoot> <TempHolingDir>$(ReleaseRoot)\temp)</TempHolingDir> <WebConfig>$(WebRoot)\Web.config</WebConfig> <DatabaseUpdate>$(DBRoot)

Publish Profile not deploying on TFS Build

筅森魡賤 提交于 2019-12-12 11:11:36
问题 I have a .net4 solution in VS2012 that has a website with its own publishprofile. The profile successfully publishes via webdeploy when executed from within VS, but when using a TFS2012 build it seems to get ignored. I pass these MSBuild arguments into the build: /p:DeployOnBuild=true /p:AllowUntrustedCertificate=true /p:PublishProfile=CI /p:Configuration=CI /p:UserName=XXX /p:Password=XXXXXX I thought DeployOnBuild=true would force MSBuild to execute the publish profiles of the same name

WPF app builds in vs2k8, but not on command line w/ msbuild

夙愿已清 提交于 2019-12-12 10:59:49
问题 I have a fairly small solution that includes a WPF windows application. It builds perfectly fine when built from the solution. I recently integrated the projects contained within the solution into an existing, much larger command line build that uses MSBuild. When built from the command line, however, I get the following errors: MainWindow.xaml.cs(12,4): error CS0103: The name 'InitializeComponent' does not exist in the current context View\EngineMonitorView.xaml.cs(12,4): error CS0103: The

MSBuild does not copy directly referenced dlls to bin folder

瘦欲@ 提交于 2019-12-12 10:55:13
问题 I am trying to build my solution with MSBuild command line on my build server. However, MSBuild does not copy any dlls to the bin folder and therefore subsequent targets fail. My solution consists of several projects where only one project should be packaged. This project references other projects in the same solution that should be built before. All references are set to <Private>true</Private> in the project file. Here is my MSBuild command: Msbuild solution.sln /m /p:BuildInParallel=true

How do I use custom variables in MSBuild scripts?

陌路散爱 提交于 2019-12-12 10:39:59
问题 Is there a way to use custom variables on the command-line when building with MSBuild.exe as follows: MSBuild.exe bootstrapper.msbuild <custom_variable1=custom_variable_value1> custom_variable2=custom_variable_value2>...<custom_variablen=custom_variable_valuen> The purpose is to know whether I have to launch another executable or not. 回答1: You should start with the basics. The answer is found in the official documentation. MSBuild calls these properties instead of variables. In practice:

Why does the verbiage for the “Copy to Output Directory” selection change between locations?

扶醉桌前 提交于 2019-12-12 10:38:21
问题 There is an inconsistency in the configuration value verbiage between Solution Explorer in VS.NET and the projected value within the .csproj file. In Solution Explorer a .config or dependency file will have multiple options in the Copy To Output Directory property that affect its build and deploy characteristics. In the Copy To Output Directory dropdown I have selected the option for a .config file: Copy if newer . However in the .csproj file it is set as PreserveNewest as seen below:

I can seem to get msbuild to build unsafe code blocks

流过昼夜 提交于 2019-12-12 10:35:24
问题 msbuild doesn't seem to allow me build unsafe blocks even though my .csproj specify: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> ... <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> my build command is: msbuild myProject.sln /p:Configuration=Release /p:Platform="Any CPU" /t:Clean,Build 回答1: You showed that the property is set for the Debug configuration. One option is that it's missing for the Release configuration. Also you specified the

Team Foundation Server 2010 / MSBuild: Error parsing the nested project section in solution file

大城市里の小女人 提交于 2019-12-12 10:30:43
问题 I'm trying to set up a nightly build for one of my company's products. When I execute the build, it fails after 45 or so seconds, giving the error "Error parsing the nested project section in solution file. This is the log from the build: Delete Binaries Directory 00:17 Delete Workspace 00:00 Delete Sources Directory 00:00 Create Workspace 00:18 Get Workspace 00:01 Create Label Label [label] (version W60_2_VMCORPTFS01;CL\me) was successfully created. 00:04 Compile, Test, and Associate