Related to "Free Startup Templates" for the last ABP 3.0 version, what are the differences between the Full .NET Framework and .Net Core (Cross Platform) versions?
I presume you are talking about the ASP.NET Core 2.0 target framework, either Full .NET Framework and .NET Core (Cross Platform)?
I think the code is more-or-less the same (as mentioned by #Alper Ebicoglu the .NET Core project is missing the SignalR implementation) but the output from the build will be for .NET Framework 4.6.1 as supposed to for .NET Core.
Basically they're building a .NET Framework project using .NET Core tools which you can do.
For example:
Create a temp folder and open Command Prompt or PowerShell in that directory. Then run dotnet new console, then dotnet restore and finally dotnet build. You should get a message like temp -> C:\Source\temp\bin\Debug\netcoreapp2.0\temp.dll
Edit the .csproj file and change the TargetFramework property to net461. Run dotnet build and you'll see a different message temp -> C:\Source\temp\bin\Debug\net461\temp.exe.
In the first instance you created a .dll to run cross platform using dotnet run and in the second instance you created a .exe which will only run on the Windows platform.
I hope I'm answering what you're asking and this helps.
if we talk about only aspnetboilerplate framework; the only main difference is, currently in .NET Core platform SignalR implementation is missing.
Related
I have a SDK styled .Net class library which compiles properly on my local machine, however fails on build server.
The contents of .csproj are
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net35;net40;netstandard1.0</TargetFrameworks>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<Version>1.5.6</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
</Project>
The error displayed is:
NETSDK1045: The current .NET SDK does not support targeting .NET Standard 4.0. Either target .NET Standard 2.1 or lower, or use a version of the .NET SDK that supports .NET Standard 4.0
I have .NET Core 3.1.113 installed on build server and .NET 5 installed on local machine.
Note: If I remove netstandard1.0 from TargetFrameworks then build succeeds on both the machines. However I want my library to target .net standard 1.0 as well.
I cannot understand why v4.0 is treated as .NET Standard 4.0 on build server. Can anyone let me know what the problem might be?
Remove the following line from your .csproj file:
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
This overrides the version value that the SDK infers from TargetFramework which will interfere with your definition of net3.5 and so on - you were actually building .NET Framework 4.0 twice and then override netstandard1.0 to .NET Standard (inferred TargetFrameworkIdentifier) to 4.0. Newer versions of the SDK may have different inference logic which may be a difference between 3.1 and 5.0 SDKs but this is an error in the csproj nonetheless.
If your build logic relies on TargetFrameworkVersion being defined in the project I suggest you try to change your build logic - this is VERY DANGEROUS to have in a modern csproj file where you rely on TargetFramework and TargetFrameworks (plural). You can also try to move it into a separate <PropertyGroup> with an always-fals-condition (e.g. <PropertyGroup Condition="'$(ThisIsToWorkAroundBuildScripts)' == 'True'">)
I cannot understand why v4.0 is treated as .NET Standard 4.0 on build
server. Can anyone let me know what the problem might be?
That is quite strange and I have not seen that issue before. And there is no info about .NET Standard 4.0 and I did not know why VS treats v4.0(net framework 4.0) as net standard 4.0. Maybe your there is some problems about your server environment.
Please follow these:
1) First, please use dotnet --list-sdks under CMD to check if you installed net core 2.1 sdk or any other versions. And actually, net core 2.1 sdk could support the previous sdks including net standard 1.0. Maybe you would better install net core 2.1 sdk. Also, you could install the latest Net Core 3.1 Sdk.
2) check system environment variable, and find whether there is a variable called MSBuildSDKsPath, if so, please delete it. Then, restart.
3) delete bin and obj folder under the build server. Also, I suggest you would better use Build Tool for VS to build your projects on the server rather than dotnet build. dotnet cli does not contain the tool for net framework. What's more, your project is multi-targetframeworks, it could build net core and net standard, and also you have to download net framework sdk.
That is too complex, you could install the Build Tool for VS2019(more likely a lightweight cmd which integrates dotnet, net framework, all vs environment). Also, install the Net desktop build tool and net core build tool workload, also install the related sdks.
When you finish it, delete bin and obj folder, type this under Build Tool for VS command:
msbuild xxx\xxx.csproj -t:clean,restore,build
I created a new .net core 3.1 project and built it using VS2019 16.4.4
Now I want to change it to .Net Standard.
I know to go to the project properties and select the Target framework combo.
However no Standard framework options appear.
If I select Install other frameworks then I am taken to The download .Net SDKs for Visual Studio page
However the SDK I want is already installed on my machine.
Why am I not seeing what I want in the combo box.?
.NET Standard, like .NET Core and .NET Framework, is separate framework, so you can't switch that easily. You would need to create separate project targeting .NET Standard. Once you do it, you will see other options in 'Target framework'.
Worth to mention, you can't reference .NET Core and .NET Framework projects from your .NET Standard library, since .NET Standard is just an abstraction which is built differently depending on the executing environment (.NET Core or Framework)
I am working in Visual Studio 2019, and .net Core 2.1.1.
I am currently working on trying to get Identity Server 4's WsFederation integrated. In the latest instructions I could find, he mentions adding System.IdentityModel to the app through the project.json. Project.json seems to be deprecated now in .net core projects, and I am having a hell of a time figuring out how to add a freaking .net assembly to my project. Do I really need to just copy the file into the project and reference, cause that just seems wrong.
Instructions I am using:
https://www.scottbrady91.com/Identity-Server/IdentityServer-4-SharePoint-Integration-using-WS-Federation
Seems to all come back to the project type. I had created the project with AspnetCore and so I couldn't reference any .net framework assemblies, because you can't go back once you have made that choice. However, if you create the project specifically under the .net framework, you can move forward into the core frameworks, and hosting libraries of core. Which then allowed me to pull in the System.IdentityModel assemblies I needed to continue forward.
I have a C# project which was created using NetFramework 4.6. I want to convert it to using the NetCore 2.1.
I checked the network, and people say I can just change the Target Framework value in the project's properties page. But on my computer, I cannot see options for NetCore.
I already have the NetCore 2.1 SDK installed.
Is there another way to convert the project? Is there something wrong with my project that prevents it getting converted?
People are wrong, there is no such "one step" approach.
Remember that .NET Core is not a higher version of .NET Framework, it is rather a rewrite from scratch. So it does not work like retargeting .NET Framework version form 4.0 to 4.5.
Porting to .NET Core from .NET Framework is a good place to get started.
Edit: This page lists some differences between .NET Core and .NET Framework.
You can't do this simply like this; because of their totally different frameworks, not different versions of same framework. You have to port your project to .net core; there is one of the nice extension for visual studio that generate a report for you about how portable your code is between .NET Framework and .NET Core.
This is also one of the article about the issue that may be useful for you.
Using VS 2008
I created a setup file for my Project, I run the setup file in my system, and My Project is working fine.
If I install my project to another system, is asking .Net Framework 3.5 at the setup time.
.Net Framework 3.5 is needed for installing my Project?
Before i installing my project, i install the .net framework 3.5, It taking to much time to setup?
How to solve this? or any other way to create a Project setup ?
Can any one help to solve my setup problem.
What you need to do is right click on the setup project in the SolutionExplorer and select the Properties menu option. You can then click on the Prerequisites button. This allows you to control what your setup program needs/wants in order to install your code.
If you don't need .NET 3.5 then just unselect it. This is just one more annoying thing that VS2008 does, you select .NET 2.0 as your target framework but it leaves .NET 3.5 as a pre-req.
If it is important for you that your program does ot require .NET 3.5, you can set up your project to target .NET 2.0. The the setup project will also see this, and (hopefully) remove the dependency when you update it.
If your project is VB.NET, you can set the Target Framework version here:
Project Properties -> Compile -> Advanced Compile Options...
If Your project is C#, it is here:
Project Properties -> Application
If you do this, of course you will not have available any .NET 3 specific functionality.
Do you rely on .net 35 features in your code. If not you can recompile with the project settings targetting .net 3.0 or 2.0.
The .NET 3.5 framework has two different installers to choose from: the bootstrapper and the full package.
The bootstrapper installer is small in size (2.7 MB). It's small because it downloads the required files from the internet when executed on the target machine. Depending upon the target's network bandwidth, it may take a long time to run.
The full package installer is large (237 MB), and does not require an internet connection to run.
If you are currently using the bootstrapper installer, you should try downloading the full package installer and running that on the target machines.
(That is, if you actually need .NET 3.5)
You can select either installer from here.