1

I figured how to change the filename of the output assembly depending on the current configuration:

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <OutputPath>path-to-debug-output</OutputPath>
    <AssemblyName>myAssembly.Debug</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <OutputPath>path-to-release-output</OutputPath>
    <AssemblyName>myAssembly</AssemblyName>
</PropertyGroup>

Unfortunately, now everytime I hit "build all" in Visual Studio in debug configuration, it actually rebuilds everything even if no changes were done at all:

1>  myAssembly -> path-to-debug-output\myAssembly.Debug.dll

In release mode I get this message exactly one time, after that "myAssembly" is not build until I do any changes to the code.

I suppose there is some check for existence of the output assembly done (and maybe timestamp checking etc.). Does someone know how I can configure this in my .csproj file (or somewhere else)?

[EDIT]

Here is an example of a full .csproj file with configuration dependent output files: http://pastebin.com/pFj4nxtj

micst
  • 31
  • 7
  • I could not reproduce that. VS is building the class library once and then with repeated builds, reported it as up to date. – Oguz Ozgul Nov 20 '15 at 14:12
  • could you send/post your .csproj file? I believe I am just missing some XML tag somewhere. Maybe it's worth mentioning that I use CMake for generation of my project files: https://github.com/micst/CMake. It's CMake fork with integrated C# support. – micst Nov 20 '15 at 14:28
  • In 15 minutes will I post it – Oguz Ozgul Nov 20 '15 at 14:29
  • Sorry for the delay, I am posting that as an answer for the sake of formatting. – Oguz Ozgul Nov 20 '15 at 15:36
  • the down voters are on the loose, down voting irresponsibly, context-free – Oguz Ozgul Nov 20 '15 at 16:10
  • @PauloFreitas has deleted my answer during a review without being aware of the context. Your last link was returning Http 404. – Oguz Ozgul Nov 22 '15 at 13:04
  • I created a pastebin account and re-pasted the data. Hope this works now. Link is in the [EDIT] section of the question. – micst Nov 24 '15 at 08:41

0 Answers0