我最近安装了 Visual Studio 2017。我迁移了在 Visual Studio 2015 中创建的现有项目。它被迁移没有任何错误。但是当我构建解决方案时,我收到 100 多个错误说明Package [Microsoft.AspNetCore...] is not compatible with [netcoreapp...]
有 100 多个项目是这样列出的。我尝试重命名
删除
修复、卸载和重新安装 Visual Studio 2017 中的sdk值时的值。但它们都不起作用。global.jsonsdkglobal.json
我不知道在哪里添加net451在imports作为解释这里,因为project.json文件被迁移时删除。
同一个项目在 Visual Studio 2015 中运行良好。所有问题都是在迁移到 Visual Studio 2017 后开始的。
请让我知道如何修复此错误。
我只是使用 Web 安装程序安装 .NET Framework 4.7.2。单击重新启动后,它会更新我的 Windows 8.1(您知道,更新屏幕上写着“不要关闭您的 PC”)。然后过了很长时间,我可以访问我的 Windows,然后我检查程序和功能,但我在任何地方都找不到 .NET Framework 4.7.2。
我知道 .NET Framework 4.7.2 已通过 regedit 成功安装在我的机器上
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
Release = 461814
InstallPath = C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
为什么不在路径中安装 .NET 4.7.2 C:\Program Files (x86)\Microsoft.NET\Multi-Targeting Pack?
那么,如果在“程序和功能”中找不到 .NET Framework 4.7.2,我该如何卸载它?
我们有一个 C# 项目,其中 C# 项目是使用 TargetFrameworkVersion 4.7.2 编译的。例如,在 csproj 文件中,这是指定的——
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
Run Code Online (Sandbox Code Playgroud)
编译和构建的 exe 安装在安装了 .net 4.6.1 的 VM 中。我看到安装成功并且软件运行良好。所以我们可以肯定地说,使用 4.7.2 构建的项目可以在安装 .netframework 4.6.1 时执行。或者这里有什么需要注意的问题吗?
下面是我正在运行的确切代码。为什么编译器返回dynamic而不输入MyClass?
我的项目在 .NET Framework 4.7.2 上运行,但我通过添加public static class IsExternalInit { }和将其配置为使用最新的 C#
<PropertyGroup>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Run Code Online (Sandbox Code Playgroud)
我的代码:
internal class Program
{
class MyClass
{
}
static class MyParser
{
public static MyClass Parse(dynamic data)
{
return new MyClass();
}
}
static void Do(dynamic data)
{
var parsedObj = MyParser.Parse(data);
...
}
static void Main(string[] args)
{
Do(JsonConvert.DeserializeObject(""));
}
}
Run Code Online (Sandbox Code Playgroud)
我正在开发一个Asp.Net项目.
我是.Net Framework 4.0版本.
当我想Linq在项目中使用时,我收到以下错误消息:
名称空间'System.Data'中不存在类型或命名空间名称'Linq'(您是否缺少程序集引用?)
我该怎么做才能解决这个问题?
我必须将一些现有的 Dot Net core 2.2 项目迁移到 Dot Net core 3.1。有一个基于 .Net Framework 4.7.2 的项目。
所以我们有一个基于 .Net Standard 2.0 开发的通用库,以便它可以同时针对 dotnet 2.2 和 .Net framework 4.7.2。
现在,如果我必须将我的 Dotnet core 2.2 迁移到 Dotnet core 3.1 并且仍然继续使用公共库,我将不得不将公共库迁移到 .Net Standard 2.1(为了支持 Dot net core 3.x)但是这个迁移到 .Net Standard 2.1 将不允许 .net 框架项目使用公共库。
有什么办法可以处理目前的情况吗?
.net .net-framework-version .net-core .net-standard .net-core-3.1
我有一个目标框架为 4.7.1 的解决方案。我已经在本地安装了 dotnet core sdks 并且能够发出构建、发布命令。
我的项目文件如下所示,其中有许多对 dotnet core dll 的引用
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net471</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.3.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.4.1" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.HttpsPolicy" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="2.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Session" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.0">
Run Code Online (Sandbox Code Playgroud)
我在尝试使用特定的 .net sdk …
我试图找到csc.exe将其添加到PATH系统变量.我一直在安装Microsoft .NET Framework 4.5 SDK.


为什么我在C:\ Windows\Microsoft.NET\Framework64中看不到v4.5?
在.NET Framework 4.5中哪里可以找到csc.exe?
我们正在将项目从.NET-Framework 3.0升级到4.5.代码升级成功,现在我们计划将应用程序发布到我们的服务器.
我们的关注:
服务器仅安装了.NET-Framework版本4.0-版本,而不是版本4.5.
这会是一个问题吗?
.net ×7
c# ×5
.net-core ×2
.net-4.7.1 ×1
asp.net ×1
asp.net-core ×1
azure ×1
azure-devops ×1
linq ×1
windows ×1