.net-framework-version

You must add a reference to assembly 'netstandard, Version=2.0.0.0

社会主义新天地 提交于 2019-12-31 08:07:46
问题 The project is an ASP.NET MVC Web App targeting the .NET Framework 4.6.1. All of a sudden (some NuGet packages were upgraded) I started to get the following error during runtime: CS0012: The type 'System.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'. In my main view Index.cshtml , in a line where I make use of @Html.ActionLink I do have .NET Core SDK 2.0 and .NET

Unhandled Exception when trying to add registry key

混江龙づ霸主 提交于 2019-12-31 05:21:09
问题 When I use the following code My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).SetValue(Application.ProductName, Application.ExecutablePath) to add a registry key to make my program startup automatically, it works on my system but on everyone who I have sent it to gets an "Unhandled Exception" message saying that access is denied. I was wondering if there is a solution to this. Thanks 回答1: You get "Access denied" because you are required to

Can a build server with .NET 4.5 installed successfully deploy a project targeting 4.0 to a server with only .NET 4.0 installed?

余生长醉 提交于 2019-12-30 04:28:26
问题 We've recently installed .NET 4.5 onto our continuous integration build server so that it can support new projects that utilize features of .NET 4.5. This build server is also used to build and deploy older projects, as well, some of which target .NET 4.0. Projects that target .NET 4.0 being built on this server, then deployed to a target server that has only .NET 4.0 installed are now failing with the following error: Method not found: 'Int32 System.Environment.get_CurrentManagedThreadId()'.

Are applications dependent on the environment where it was compiled?

ε祈祈猫儿з 提交于 2019-12-28 07:16:08
问题 We are having a System.BadImageFormatException in our MSI installers. I have already read about the target frameworks, but we already checked and it's targeting the correct framework ( .NET Framework 4.5 same with our QA machines). We have exactly the same source codes, but the results of the msi installer compiled by our 'build team' fails, but the msi installer compiled by us 'dev' works. Question is, does the environment where an application was built and compiled affects the output

Are applications dependent on the environment where it was compiled?

假装没事ソ 提交于 2019-12-28 07:16:02
问题 We are having a System.BadImageFormatException in our MSI installers. I have already read about the target frameworks, but we already checked and it's targeting the correct framework ( .NET Framework 4.5 same with our QA machines). We have exactly the same source codes, but the results of the msi installer compiled by our 'build team' fails, but the msi installer compiled by us 'dev' works. Question is, does the environment where an application was built and compiled affects the output

ASP.net 5 preview templates are missed in Visual Studio 2015

五迷三道 提交于 2019-12-25 07:59:04
问题 I have installed Visual Studio 2015 update 3 and have installed the latest Web Essentials update and also have installed DotnetCore version. But when I create a new asp.net project, only asp 4 templates like in the image are available create form image 回答1: First of all, there is no ASP.NET 5 anymore. It has officially been renamed to ASP.NET Core 1.0. You seem to have missed that announcement, which would have made the selections in Visual Studio more obvious. When you choose File > New

Is it possible to have an ASP.NET Core solution contain projects with different target frameworks?

会有一股神秘感。 提交于 2019-12-24 09:08:12
问题 Like so: One solution (I assume this must be ASP.NET Core?) Project 1. Target Framework is .NET Core 2.1 Project 2. Target Framework is .NET Framework 4.5.1. A class Library that handles data access. The reason I am asking is Project 2 contains legacy dependencies that we do not have time to migrate at the moment. 回答1: The solution has nothing to do with the target frameworks utilized. Target frameworks apply to projects, so you can have every project target something different in a solution

Visual Studio 2013: “No framework version is selected, you must select one before creating a project.”

こ雲淡風輕ζ 提交于 2019-12-23 09:40:57
问题 I've recently installed Visual Studio 2013 on my laptop (Windows 8.1) and I've ran into trouble when trying to create a project. I'm prompted to select a framework version, but the list of frameworks is empty. See below picture. As I've read on msdn, the .NET framework version 4.5 should be included in Visual Studio 2013, but as you can see, it's not in my list of frameworks. I've tried to install version 4.5.3 manually but the problem persists. How do I solve this? 回答1: Uninstall Visual

Could not load file or assembly 'netstandard, Version=2.0.0.0

天大地大妈咪最大 提交于 2019-12-23 05:22:30
问题 I'm getting the following error after deploying a .net framework 4.5.2 web api. Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.` This doesn't happen on all the endpoints, just one, where I'm using Microsoft.Xrm.Sdk. The thing is that it just started to happen, didn't update any packages. And worst, it doesn't happen locally, when debugging, even if building

How to manipulate a control without any pattern implemented?

会有一股神秘感。 提交于 2019-12-22 20:02:14
问题 I'm trying to implement the automation test via UIAutomation for our project. But lots of the controls are not standrad, and proper patterns are also not implemented for that controls. How should I to manipulate the controls via UIAutomation framework in this case? For example, a button in our product is implemented via a Pane, and the invoked pattern is not implemented as well. How should I click the button? (To avoid installing VS on the test machine, I don't want to use Mouse.Click() in