When I try to compile my project from x86 debug mode in Visual Studio 2008. I am getting this error. When I looked at the property group of the project that complained, I se
The WiX project I was using was hard-set in the configuration manager for x64
across the board. When making the Custom Action project for the solution, it defaulted everything to x86
within the .csproj
file. So I unloaded the project, edited it by changing all x86
to x64
, saved, reloaded, and was good to go after that.
I don't understand why I had to do this. The configuration manager was set to build as x64, but just wouldn't get set in the csproj
file :(
I had the same error, so I looked on project settings and there in "Build" section is "Build output path" option. And value was empty. So I filled in "bin\" value a error disappeared. It solved my problem.
I had exact same error after adding a new configuration via ConfigurationManager in Visual Studio.
It turned out when the 'Production' configuration was added for the whole solution (and each project) the OutputPath element was not added to the .csproj files.
To fix, I went to the Build tab in project properties, changed OutputPath from \bin\Production\
to \bin\Production
(deleted trailing \
) and saved changes. This forced creation of the OutputPath element in the .csproj file and the project has built successfully.
Sounds like a glitch to me.
I have had similar issue on a Xamarin Project. It is maybe rare case but in case anyone else is having the issue. my project structure was like below
If you get this error only when you try to compile your project from commandline using MSBuild (like in my case) then the solution is to passing the outputpath manually to MSBuild with an argument like /p:OutputPath=MyFolder
.
I have:
Copy-paste the configuration from existing configuration which works with specific name and targeting platform (I had Release | x64):
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>