“the outputpath property is not set for this project” error

Usually this happens when the OutputPath property of the project file is blank. Project files are just MSBuild files. To edit in Visual Studio: Right click on the project, pick “Unload project” then right click on the unloaded project and select “Edit …”. Look for the Release-Versionincrement property group. It should look something like <PropertyGroup … Read more

Could not load file or assembly ‘Microsoft.Build.Framework'(VS 2017)

I believe I had the same issue as you did. I didn’t save the whole error message, but my error message was ‘Could not load file or assembly ‘Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.‘ I am using Visual Studio 2017 and was trying to do … Read more

Copy all files and folders using msbuild

I was searching help on this too. It took me a while, but here is what I did that worked really well. <Target Name=”AfterBuild”> <ItemGroup> <ANTLR Include=”..\Data\antlrcs\**\*.*” /> </ItemGroup> <Copy SourceFiles=”@(ANTLR)” DestinationFolder=”$(TargetDir)\%(RecursiveDir)” SkipUnchangedFiles=”true” /> </Target> This recursively copied the contents of the folder named antlrcs to the $(TargetDir).

Change name of exe depending on conditional compilation symbol

If you load the .csproj file into a text editor, you can control the AssemblyName property: <AssemblyName Condition=”‘$(Configuration)’ == ‘Debug'”>WindowsFormsApplication9.Debug</AssemblyName> <AssemblyName Condition=”‘$(Configuration)’ != ‘Debug'”>WindowsFormsApplication9</AssemblyName> Note though that this does not only change the file name, but the assembly name, which might mean trouble if you have other code referencing the assembly. I never did this … Read more