msbuild

How can I inject a XAML transformation into my build?

纵然是瞬间 提交于 2019-12-23 20:20:56
问题 I'd like to run a custom EXE against my XAML Resource Dictionaries. Let's say this exe that I've got is going to strip out comments, whitespace and unused resources. The original XAML files need to be untouched, but the XAML (silverlight) and BAML (wpf) that ends up in the XAPs and DLLs needs to be transformed. It needs to work on my computer and the build server. My question is: what's the simplest and most reliable way to run this exe? My first thought was to have a pre-build event. But

How to stop Visual Studio caching Imported MSBuild scripts?

大憨熊 提交于 2019-12-23 20:14:55
问题 I have a csproj file which references a shared MSBuild script with an <Import> directive. I have noticed that when I change the shared script, I need to close and reopen Visual Studio before it notices the change - a build within Visual Studio notices changes to the csproj file but not the shared file. This doesn't happen when I build the project with MSBuild from the command line. Is Visual Studio caching the imported script? If so, why? And how can I turn off this behaviour which makes

TeamCity - MSBuild - SVN - AssemblyVersion - C#

為{幸葍}努か 提交于 2019-12-23 19:28:53
问题 I'm currently using MSBuild+Community Task's to change the AssemblyVersion, AssemblyFileVersion + more in AssemblyInfo.cs, via TeamCity and it works like a charm :). However I would like to commit the modified AssemblyInfo.cs back to the repo. How can I do that? I tried with the " SvnCommit " task from Community Tasks , but on the Agent's the source is not checked out, it appears to be Exported or copied directly from TC instead (there's no .svn folders). This is actually very cool I think

Microsoft.TeamFoundation.VersionControl.Client.ItemNotMappedException even when the workspace exists and has a mapping

旧城冷巷雨未停 提交于 2019-12-23 18:34:08
问题 Using TFS 2015 update 2, an agent was installed in a machine, the agent creates its workspace: Some custom MSBuild tasks developed InHouse were implemented in the build definition that will run on the agent. Those tasks perform some operations against the TFS server. When the build definition is queued for a new build here is what I got: In the build machine I proceed to run the following script, in order to verify the existence of the workspace : # Script to find a Team Foundation workspace

How do I configure a Web Application project for working with html pages without .Net code?

谁说胖子不能爱 提交于 2019-12-23 18:20:41
问题 We have a few html pages in one of our solutions that are meant to be extremely simple, client side only, pure html+javascript pages that access our web api. The api itself is in a web application project in the same solution. We are now using a web site project to contain those files, but it is getting harder and harder to manage that project, since it's information is placed on the solution, and most of it's aspects cannot be controlled like they can on a msbuild project file. I'd like to

MSBuild command line execution of Visual Studio 2010 Solution fails referencing VS2010 SDK to build an extension

微笑、不失礼 提交于 2019-12-23 18:11:17
问题 Scenario Solution that has a VS2010 extension in it (.NET 4 Class library, with a WPF UI) It builds fine inside visual studio On the same machine when I attempt to build it via command line (as part of a build script) Fails when using this command to attempt to build it: msbuild JsExt.sln /t:Build /p:Configuration=Debug /p:OutDir=..\..\Binaries Update To MSBuild Adding /property:VsSDKInstall="C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\VSSDK" leads to this exception...

How to invoke executing a PowerShell script from gulp?

白昼怎懂夜的黑 提交于 2019-12-23 18:05:39
问题 I am using gulp to build and deploy our application. var msbuild = require('gulp-msbuild'); gulp.task('build', ['clean'], function () { return gulp.src('../../*.sln') .pipe(msbuild({ toolsVersion: 14.0, targets: ['Rebuild'], errorOnFail: true, properties: { DeployOnBuild: true, DeployTarget: 'Package', PublishProfile: 'Development' }, maxBuffer: 2048 * 1024, stderr: true, stdout: true, fileLoggerParameters: 'LogFile=Build.log;Append;Verbosity=detailed', })); }); However after build I have to

How to use MSbuild property in TransformXml task?

拥有回忆 提交于 2019-12-23 18:04:33
问题 I'm using MsBuild and the TransformXml task to set up some web.config files. That's all working completely fine, but now I want to expand a MSBuild property within the xml transformation. To be more clear, I batch the TransformXml task using an itemgroup to do several transformations for multiple web sites that just differ in configuration: <PropertyGroup> <WebsiteTargetDirectory>$(MSBuildProjectDirectory)\BUILD\</WebsiteTargetDirectory> </PropertyGroup> <ItemGroup> <WebsitesToBeCopied

Reading a single value from a file in MSBuild

♀尐吖头ヾ 提交于 2019-12-23 18:04:07
问题 I'm trying to read a version number from a file in MSBuild: <ItemGroup> <VersionFile Include="Properties\VERSION" /> </ItemGroup> <Target Name="BeforeBuild"> <ReadLinesFromFile File="@(VersionFile)"> <Output TaskParameter="Lines" ItemName="VersionNumber" /> </ReadLinesFromFile> </Target> I only need the first line of this file. How can I concatenate that value with another string in WriteLinesToFile ? This does not work: <WriteLinesToFile File="$(AssemblyVersionFile)" Lines="[assembly:

Can I generate a deployment script from a dacpac

邮差的信 提交于 2019-12-23 18:00:04
问题 I've got a .dacpac file that's being called by MSBuild and published to a QA database for testing. This publish is failing and the error I'm getting back from them is a generic "an error has occurred" message. I was hoping I could generate the deployment script from the dacpac and walk through it to see where the problem is occurring and hopefully teach them how to do this as well. Is there any way to point a dacpac at a specific database and have it generate the sql for updating the database