I have recently attempted to migrate my open source project GeographicLib.FSharp (https://github.com/SpiegelSoft/GeographicLib) to .NET Standard. I can build the project, package it and upload it to nuget, but when I try to load the nuget package into an external .NET Standard Library, I obtain mixed results.
Creating an F# library using dotnet new classlib -lang f# and adding the Nuget package via Visual Studio works on the face of it, but I cannot access any of the types I defined in the GeographicLib.FSharp library.
If I create a C# .NET Standard library using the Class Library (.NET Standard) template, then upgrade this package to .NET Standard 1.6, I can add the GeographicLib.FSharp nuget package and access the types as normal.
It appears that importing types from Nuget packages in F# .NET Standard Libraries is broken.
Is there a fix or a workaround for this?
Visual Studio F# extension doesn't yet support .NET Standard or .NET Core projects.
See https://blogs.msdn.microsoft.com/dotnet/2017/08/14/f-and-net-core-roadmap-update/ for more info and roadmap
If you think is an issue, please open a bug in Visual F# repository https://github.com/Microsoft/visualfsharp/issues
These project build, but doesnt load intellisense in Visual Studio.
Meanwhile you can use other ide/editors, like:
Visual Studio Code with Ionide extension
JetBrains Rider
vim
emacs
Visual Studio for Mac
Related
We have a legacy C# and C++ solution (web services, web app, OWIN and Nancy) that was built with Visual Studio 2013. We now must use Visual Studio 2019 Enterprise. The solution has a .nuproj file that we were using with the open source nuproj github repo that has been archived and is unsupported in VS 2019. The nuproj authors have not supplied any help (from what I can see) on how to convert or migrate nuproj to a VS 2019 format.
I am wondering if anyone knows the quickest way to get this working?
Alternatives would also be appreciated.
I read:
Quickstart: Create and publish a NuGet package using Visual Studio (.NET Standard, Windows only), but I was hoping not to install .NET Core on my company laptop yet.
Automating creating NuGet package as part of build process, but I see that is eight years old.
Internet searches about csproj self-pack and dotnet pack, but again, I do not want .NET Core right now.
Nothing straightforward. I will retool and use NAnt.
I have a MVC .Net application that uses a Crystal Report to return a PDF file. It was working ok, but I wanted to install the most recent version of the runtime on the server to see if it would correct an issue with fonts that I was experiencing.
The server is Windows Server 2008 R2, and I installed the most recent version of CR for VS from the SAP website. This installed two things on the server: SAP Crystal Reports runtime engine for .NET Framework (64-bit) 13.0.21.2533, and SAP Crystal Reports, version for Visual Studio 13.0.21.2533.
My Visual Studio project has the following Nuget packages installed: CrystalDecisions.CrystalReports.Engine, CrystalDecisions.Shared, CrystalDecisions.ReportSource, CrystalDecisions.Web.
Now when I try to access this page and generate the PDF, I get the following server error:
Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
I'm not finding any coherent info online as to why this error is appearing or how to resolve it aside from copying DLLs to the bin folder. I tried adding a couple of Nuget packages relating to CrystalDecisions.ReportAppServer. There is not a Copy Local option for the DLL reference, so I tried to manually copy the DLL from the Nuget packages folder for the project and paste them into the bin folder, but that didn't lead anywhere except more errors that I couldn't resolve.
The documentation on this stuff is horrible and confusing, when it seems like it should be pretty straightforward, as I said this was already working before I upgraded the runtime and CR for VS.
Are the Nuget packages maybe not compatible with this newer version? On this SAP blog post, it mentions "As most of CR/RAS .NET Assemblies are now re-versioned from 13.0.2000.0 to 13.0.3500.0, user MUST remove all old CR assemblies from Reference list and add the new version of CR assemblies, then rebuild the application.", but I do not know where to get these assemblies aside from using the Nuget packages.
Please download all the packages of crystal reports 13.0.21. You have to download all packages are given below.
CrystalDecisions-CrystalReports-Engine
CrystalDecisions-ReportSource
CrystalDecisions-Shared
CrystalDecisions-Web
CrystalDecisions-ReportAppServer
every time i clone Abp.ModuleZero to my machine when i run nuget command update-database the error show me and when i build the solution in viusal studio the project doesn't build and show many errors in error list console window
most of them is like :
The type 'Object' is defined in an assembly that is not referenced.
You must add a reference to assembly 'netstandard, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
i try to install Netstandard.library package from package manager console window but doesn't any sense.
my visual studio IDE version is 2015 Update 3.
ABP v3.0.0 is based on .NET Standard 2.0.
This concerns you regardless if you are on MVC 5.x, .NET Framework 4.x or .NET Core 2.x.
You should use VS2017 15.3.3+.
For VS2015, you may try installing NuGet client 3.6 or higher but that may no longer work.
i think downgrade to earlier version of this framework is good solution for me, where can i download early version of ABP framework like 2.3.4?
I don't see why you would download the framework, but it's on GitHub.
If you meant download a template that uses an earlier version of ABP:
You can only choose the project version for premium startup templates.
You can build your own from module-zero-core-template/releases/tag/v2.5.1.
You need to rename the files and folders yourself.
I have created a asp.net mvc core app targeting the .net framework (not the multi platform core) as I want to include standard .net framework libraries and running cross platform is irrelevant to me as I will be hosting in Azure.
The solution looks like this:
I am trying to get a VSTS build working with this project (which is part of a larger solution) but when building I get the following error:
Which seems to be a common error. What should my build definition look like to build these .csproj based projects? There seems to be a lot of information but no definitive answer. Hopefully that answer can be here and people can stop looking elsewhere for information on how to get a Continuous Integration build going.
On a side note at the solution level I find no packages folder containing my nuget packages, why is this? The project definitely contains nuget packages.
Your project is using the newest MSBuild based project files for .NET Core.
The extension is still .csproj, but the XML schema is different than the ordinary .csproj used in .NET46 (and previous versions).
You need appropriate tooling to build such .csproj file, for example:
Visual Studio 2017: install it on your private build agent; VSTS hosted build agent does not have VS2017 installed yet;
.NET Core SDK 1.0.0-preview4-004233 (or more recent): this SDK contains the command line tool 'dotnet' for MSBuild .NET Core based projects.
Note in your build log that the msbuild used is the one shipped with VS2015 (version 14.0) instead, that does not support such .csproj format file.
On the other hand, if you do not need multiplatform nor any other benefit of .NET Core, why are you using it? Just created an ordinary ASP.NET 4 web project targetting .NET 4.6.
I have an F# program I built in VS2013. I am intending to deploy this on a windows 2008 R2 server with .NET framework 4.5 installed. Now, when I build the program in visual studio, it creates an exe in the debug/bin directory (MyProgram.exe). Do I need to include a copy of fharp.core.dll with the exe? Or, will the build process automatically compile the necessary dependancy DLLs (fsharp.core, fsharp.data, fsharp.data.TypeProviders)? Most of the research I can search online for seems to look at VS2010 and I am not using fsc,exe currently.
Thanks for any insight provided.
You can use the compiler option --standalone to statically links the FSharp.Core.dll (F# runtime) and any reference assemblies that depend on it (i.e. any other F# assemblies).
You may or may not need to copy FSharp.Core.dll together with the .exe.
If F# is already installed on the server, you may not need it, but it has to be the correct version of F#.
Otherwise, the F# license allows you to deploy FSharp.Core.dll together with your own binaries.
There's also the 'official' FSharp.Core NuGet package, if that's more to your liking.