This project is read-only.
1

Closed

WPF Project Error in Release Mode

description

I'm using this in a regular WPF projects (system tray application as a matter of fact). When using the debug and release xlmns elements as per your documentation, my project builds and runs in Debug mode, but not in Release mode.

I'm getting the following error:

The "PreprocessXaml" task was not given a value for the required parameter "DefinedSymbols". <myProjectDir>\packages\xcc.1.0.3\build\Xcc.targets

This seems to me like a problem in the same area as the C++ issue which was fixed in the last release. The strange thing is that it works in Debug mode builds but not in Release mode builds.

Kind Regards,
Maarten
Closed Sep 18, 2014 at 11:10 AM by kozw

comments

MJLHThomassen wrote Sep 17, 2014 at 4:28 PM

I've traced it down to the fact that MSBuild, for some reason, has an empty $(DefineConstants) when building in release mode.

In debug mode, it contains "DEBUG;TRACE".

In my .csproj file the following is defined (ive cut away some things for readability of course, and I am building in x86 mode):
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <...>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <DefineConstants>TRACE</DefineConstants>
    <...>
  </PropertyGroup>
So now to figure out why DefineConstants is empty...