Outputpath property not set for this project - F #

When I create a new F # application in Visual Studio 2012 and build it, the same error occurs:

Error 1 The OutputPath property was not set for the project 'TestingF.fsproj'. Pleasecheck to make sure that you specify the correct combination of configuration and platform for this project. Configuration = 'Debug' Platform = ''. This error may also occur if any other project tries to link to the project for the project, this project has been unloaded or not included in the solution, and the link project is not built using the same or equivalent configuration or platform. C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets 592 5 TestingF

Tried to change platform configuration | Platform using Configuration Manager, as well as upload the project and edit the .fsproj file.

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <Tailcalls>false</Tailcalls> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <WarningLevel>3</WarningLevel> <PlatformTarget>AnyCPU</PlatformTarget> <DocumentationFile>bin\Debug\TestingF.XML</DocumentationFile> <Prefer32Bit>true</Prefer32Bit> </PropertyGroup> 

The same error never occurred using any other .Net language.

+4
source share
2 answers

Take a look at the error:

[...] make sure you specify a valid combination of configuration and platform for this project. Configuration = 'Debug' Platform = ''. This error may also appear [...]

Visual Studio is trying to build Platform = '', Configuration = 'Debug'. However, the project file you published defines the following configuration:

 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> . . . </PropertyGroup> 

That is, he tells Visual Studio how to create 'Debug' / 'AnyCPU', but not 'Debug' / ''.

If you insert "AnyCPU" there, it should give you the results you are looking for.

A more detailed answer can be found here: fooobar.com/questions/64366 / ...

+1
source

Just in case, someone else is faced with this problem, here's how to fix it .

The problem is similar to the one that Gustavo solved in the previous answer, but for F # projects, it seems that there is another additional problem that you have to solve.
I had this problem in VS2013 Update 2 . The problem appeared after editing the platform settings, adding the x64 platform to Configuration Manager.

The problem is with the order of some XML tags in the .fsproj file . The following is the correct .fsproj file.

 <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" ...> <Import Project=.../> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> ... <RestorePackages>true</RestorePackages> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> ... </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <Tailcalls>true</Tailcalls> ... </PropertyGroup> <PropertyGroup> <MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion> </PropertyGroup> 

It happens that sometimes after editing configurations in Configuration Manager, one or more PropertyGroup tags that configure the platform (Debug | x64 or Release | x64) are moved down to the file.

So, just edit the fsproj file and move these tags up. For example, move them immediately before the group that defines MinimumVisualStudioVersion, as in the example. Save, reload the project and compile.

+4
source

All Articles