Hello I am trying to learn F#, I'd like to compile something in F#
These are the steps that I have followed:
Downloaded Visual Studio Code
Downloaded + installed all the Ionide
extensions
Ran F# new project, selected console application
Ran FAKE: build
I then get the error: The target "Build" does not exist in the project.
What are the steps I need to follow to compile a F# solution in Visual Studio Code?
---------------------------------------------------------------------
1) Building c:\Users\sfyir\Code\fsharp\ConsoleTest\ConsoleTest.fsproj failed with exitcode 1.
---------------------------------------------------------------------
2) MSB4057: c:\Users\sfyir\Code\fsharp\ConsoleTest\ConsoleTest.fsproj(0,0): The target "Build" does not exist in the project.
Related
I am trying to set up a hello world project SpecFlow but I cannot seem to build and run the tests for my project. I have even sent my .sln to a colleague and it builds and runs perfectly on his machine.
We are both using Visual Studio 2019; I followed the 'Getting Started' page on spec flow website; I have 'Enable SpecFlowSingleFileGenerator' set to False. I have the extension installed for Visual Studio 2019.
Example files: https://github.com/SpecFlowOSS/SpecFlow-Examples
When I go to build I get the following in the *.feature.cs file:
#error Could not find a reference to SpecFlow in project 'MyProject.Specs'.
#error Please add the 'TechTalk.SpecFlow' package to the project and use MSBuild generation instead of using SpecFlowSingleFileGenerator.
#error For more information see https://specflow.org/documentation/Generate-Tests-from-MsBuild/
Any ideas?
I have an ARM-GCC project, which is configured and built using Visual Studio's native "Open folder..." CMake project support (introduced in VS2017). All of our needed build settings are stored in CMakeSettings.json.
I would like to build this project using our TFS Continuous Integration server.
I've confirmed that our build server contains all of the prerequisites provided 'out of the box' by the Visual Studio 2017 installer - CMake, Ninja, and ARM-GCC compilers. These tools are all installed to a 'standard' Visual Studio tooling location:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Linux\gcc_arm
etc.
These tools 'just work' out of the box, when we open the project using Visual Studio's "File" -> "Open Folder..." approach. Within TFS however, we can't seem to get the solution to build. I've tried a few different approaches within the build definition...
Option 1: 'Visual Studio' task
This approach complains about a missing sln/proj file:
Specify a project or solution file. The current working directory does
not contain a project or solution file.
There is no project or solution file, because it is an "Open Folder" project, with a CMakeSettings.json file, instead...
Option 2: 'MSBuild' Task
I have not found a set of command-line options capable of building a CMake project folder, using MSBuild.
Option 3: 'CMake' Task
When adding a CMake task to the build definition, the build server complains that it does not fulfill the auto-generated "cmake" ability prerequisite, despite the fact that Visual Studio has installed the cmake tool.
Has anyone successfully completed a TFS automated build of a Visual Studio-hosted "Open Folder..." CMake project?
I'm trying to use F# with VS Code (v1.17.2) on MacOS (Sierra 10.12.6)
I think i've installed latest versions of Mono and .NET SDK
I'm trying just to build the simple project described here as a test
https://github.com/s952163/FSharpVSCode
after my default installation, I could do a MSBuild and run the program in the terminal without any problem. However at that stage,
(1) Intellisense is not working properly, not recognizing Deedle
(2) in the F# explorer it would say
'TestProject1.fsproj (load failed)
when doing a right-click i got this error
Error: MSBuild failed with exitCode 1 Working Directory:
'/Users/francois-guillaume.rideau/Documents/FsharpVsCode/TestProject1'
Exe Path: 'dotnet' Args: 'msbuild
/Users/francois-guillaume.rideau/Documents/FsharpVsCode/TestProject1/TestProject1.fsproj
/p:SkipCompilerExecution=true /p:ProvideCommandLineArgs=true
/p:CopyBuildOutputToOutputDirectory=false
/p:UseCommonOutputDirectory=true /t:_Inspect_FscArgs
/p:_Inspect_FscArgs_OutFile=/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/tmp52c377ed.tmp.FscArgs.txt
/p:DesignTimeBuild=true /t:_Inspect_GetResolvedProjectReferences
/p:_Inspect_GetResolvedProjectReferences_OutFile=/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/tmpfe4a2c2.tmp.GetResolvedProjectReferences.txt
/t:_Inspect_GetProperties
/p:_Inspect_GetProperties_OutFile=/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/tmpfe4a2c2.tmp.GetProperties.txt
/nologo /verbosity:quiet' Log: writing helper target file in
'/Users/francois-guillaume.rideau/Documents/FsharpVsCode/TestProject1/obj/TestProject1.fsproj.proj-info.targets'
/usr/local/share/dotnet/sdk/2.0.2/Microsoft.Common.CurrentVersion.targets(1122,5):
error MSB3644: The reference assemblies for framework
".NETFramework,Version=v4.6.1" were not found. To resolve this,
install the SDK or Targeting Pack for this framework version or
retarget your application to a version of the framework for which you
have the SDK or Targeting Pack installed. Note that assemblies will be
resolved from the Global Assembly Cache (GAC) and will be used in
place of reference assemblies. Therefore your assembly may not be
correctly targeted for the framework you intend.
[/Users/francois-guillaume.rideau/Documents/FsharpVsCode/TestProject1/TestProject1.fsproj]
to try to solve this, i typed in the following
export FrameworkPathOverride=/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/
but worse, after that, the project doesn't build anymore in VS Code as I get this output when trying (Cmd-Shift-P) MSBuild: Build Project
/usr/local/share/dotnet/sdk/2.0.2/Microsoft.Common.CurrentVersion.targets(1122,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/Users/francois-guillaume.rideau/Documents/FsharpVsCode/TestProject1/TestProject1.fsproj]
screenshot here https://imgur.com/KtMM2Bu
VS Code environment is passed to msbuild when it invokes it, so setting environment variables on startup of VS Code does the trick:
FrameworkPathOverride=/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/ code .
Go to project location in the terminal and then run FrameworkPathOverride=/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/ code . as said before.
Then you should be able to build again.
We are building delphi projects using the msbuild tasks in VNext builds, they were running successfully until the TFS build agents were update to latest version 2.112.0, following is the error message: Error MSB4057: The target "Clean" does not exist in the project. Process 'msbuild.exe' exited with code '1' Any inputs to solve these errors would be helpful.
Can you build the project from command line in the build server?
Please make sure you specified the parameters correctly.
The property parameter (/p) forwards properties to the actual compiler. You can specify for example the configuration using /p:config=
So if you want to clean and then build a project using the release configuration, specify the paramters like this:
msbuild.exe "/t:Clean" "/t:Build" "/p:config=Release" Myapp.dproj
Please reference this thread Automate Delphi 2010 project build with MSBuild
And Thomas's answer in this article .
I recently upgraded from VS2010 to VS2013 on our project.
When trying to run our web deploy I now receive this error:
"C:\G\ectc.proj" (Deploy target) (1) -> "C:\G\Source\Web\Web.csproj (ResolveReferences;_CopyWebApplicatio n target) (14:18) -> C:\g\Source\Web\Web.csproj : error MSB4057: The target "_CopyWeb Application" does not exist in the project.
It's strange, If i checkout the code before the upgrade and run the same build command which is:
msbuild ctc.proj /t:Deploy
It work's fine, But doesnt if i run the that command on the VS 2013 code base.
Thanks
Try pre-processing ctc.proj from the 2010 environment and the 2013 environment to determine which target files are missing, or what's occuring in the 2013 deployment and failing to resolve the targets file containing CopyWebApplication.
In the 2013 environment use:
msbuild ctc.proj /pp >2013.txt
In the 2010 environment use:
msbuild ctc.proj /pp >2013.txt
I'm guessing it's using an incorrect path to the target containing CopyWebApplications.