I'm trying to create an installer using VS 2019 for a .NET Core 3.1 Console App.
It will be installed in a computer without internet and without the .NET Core 3.1 there.
I have added .NET Core Runtime 3.1.x as a Prerequisite in the Prerequisite Dialog.
When I build, its coming up with this error:
ERROR: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'netcore3coreruntime_x64\dotnet-runtime-3.1.18-win-x64.exe' for item '.NET Core Runtime 3.1.18 (x64)' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=616018.
The question is, in my development PC where should I put this file?
Place the installfile "dotnet-runtime-3.1.18-win-x64.exe" in directory "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\BootstrapperPackages\netcore3coreruntime_x64"
And check in the "product.xml" file in same directory, that the key "publickey" is not "0" and is set to "3082010a0282010100d0e4cf8fb3f5fb04dbafe41ff423aba80f08f43493a8d4aad542a3bb82045771c925c93ad62f8c4c4a18c8a2ed88b1b62717aef05f3540ab93a6e287be2dfcd20cece371bea6b34d20068d0e41aab04350628f227b36f0dff342357d6f4e2fbe8ab745a9736ceb1a1cdc1dd6fbba93ebbf1bd234d52fc4adec830ed84eddf5e35d2fa44a7cc9f04497f85df19cc0bf8ec30a02798f5ce6dbde6cd515591cda7a3288901553840a6e00c0ada5dbc8be60447524ee08a654c7e38bafcd7f6846724768cbd6cd9129a333f2e2334ed830ea6dc36ce3387b0163211353d615503e08723f127e67012bc2bcb9ae47fb7cab86dcf1747c408649412a7ed94ea6da574d0203010001"
Related
I'm going to create Q# application for the first time. I installed the "Microsoft Quantum Development Kit" and I have .not core 3.1.301 (the latest)
I use VS 2019 Community Edition.
In VS, I see the Q# Application when creating new solution but when I try to create , I get below error:
The project file cannot be opened by the project system, because it is
missing some critical imports or the referenced SDK cannot be found.
Detailed Information: The SDK resolver "NuGetSdkResolver" failed to
run. Unable to find fallback package folder
'C:\Microsoft\Xamarin\NuGet\'.
C:\Program Files\dotnet\sdk\3.1.301\Sdks\Microsoft.Quantum.Sdk\Sdk not
found. Check that a recent enough .NET Core SDK is installed and/or
increase the version specified in global.json.
I could not find any solution over the web.
The Quantum.SDK is not distributed with the extension, instead is downloaded the first time you try to build/create the Q# application.
Looks like Visual Studio is having problems downloading it using NuGet. I can think of two reasons:
1. You are not connected to the internet, so it can't connect to nuget.org to download the package
2. The error points to a missing "C:\Microsoft\Xamarin\NuGet\", I would suggest creating this folder.
To create a .NET class library from the command line, you can run the script
dotnet new classlib
Do that in a clean folder, and it will create a csproj file that can then be opened in Visual Studio 2017.
However, run the script
dotnet new classlib -lang f#
in a clean folder, and the fsproj file that is subsequently create cannot be opened in Visual Studio 2017. The error message reads
The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\FSharp.NET.Sdk\Sdk\Sdk.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
I have searched for clarification of this issue, and it appears that there is work ongoing to fix it, but I wondered in the interim if there are any add-ins I can install to get this working immediately.
The latest preview releases of Visual Studio and .NET Core support loading .fsproj projects, apparently.
See this comment on the GitHub issue:
Closing this now, as these projects load with 15.3. The current way to use them:
Download VS 2017 Update 3 Preview 3 (or a further preview if it's released and you're reading this)
Download the latest CLI/SDK from here: https://github.com/dotnet/cli/tree/release/2.0.0#installers-and-binaries
(Yes, the .NET SDK is independent of VS. You will also need this to get .NET Core 2.0 support in VS 2017 Update 3 Previews).
I use framework 4.5 and vs 2013 and TFS 2013. When I build project get error like that;
"C:\Program Files
(x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets
(3079): Task could not find "AL.exe" using the SdkToolsPath "" or the
registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft
SDKs\Windows\v8.1A\WinSDK-NetFx40Tools-x86". Make sure the
SdkToolsPath is set and the tool exists in the correct processor
specific location under the SdkToolsPath and that the Microsoft
Windows SDK is installed"
I tried everything but I could't fix error. Can you help me about it ?
Download and install the Windows Software Development Kit (SDK) for Windows 8.1. In the setup program, make sure .NET Framework 4.5.1 Software Development Kit is selected.
This will install al.exe to C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools.
I am working on a conversion of tfs 2013 build definition, we were initially using tfs 2008.I have a new server with TFS2013 installed and working on Build definition for 2013 xaml (workflow) customization is completed. However i am facing an error when my TFS build in release mode for Any Cpu configuration, but its fine when i use debug mode. I have tried looking many articles and unable to find any solution kindly help me here. This is fine in my local machine but happens only in the server.
Project and details
1) project is .net framework 4.0
2)Default configuration is "Any Cpu"
3)TFS 2013 server is 64 bit, windows server 2008 r2
Build Definition
Configuration : Any CPU|Release
MsBuildPlatform : x86
Error:
SGEN: An attempt was made to load an assembly with an incorrect format: C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll.
Warning:
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (990): The reference assemblies for framework ".NETFramework,Version=v4.0" 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.
I have installed windos 8 SDK (Tools only)
and Windows framework 4 x64 as x86 version is failing
The folder C:\Program Files\Microsoft SDKs\Windows has v7.0 folder
C:\Program Files (x86)\Microsoft SDKs\Windows has v8.1A folder
where as my local machine has many versions inside the windows folder in above path
List of related articles which i have checked,but couldn't find a solution
http://seravy.wordpress.com/2012/10/25/installing-net-4-5-and-not-windows-sdk-8/
http://blogs.msdn.com/b/windowssdk/archive/2009/09/16/windows-7-sdk-setup-common-installation-issues-and-fixes.aspx
Running MSBuild fails to read SDKToolsPath
http://dukelupus.wordpress.com/2008/02/05/task-failed-because-sgenexe-was-not-found-solution/
How do I fix the Visual Studio compile error, "mismatch between processor architecture"?
TFS 2010 creating .Net 4.0 XmlSerializers DLL for .Net 3.5 Application
So what should i do to fix this error ?
You need to install the targeting packs (aka SDK, aka Developer pack) for the .NET Framework version you are targeting. You can download them all from http://blogs.msdn.com/b/dotnet/p/dotnet_sdks.aspx
Specifically for your question and targeting .NET Framework 4.0, you want Windows SDK for Windows 7 and .NET Framework 4 Sounds like you grabbed the Windows 8 SDK, which is not what you want for targeting .NET Framework 4.0.
This is not a very good answer (but in case someone comes across it like me), and does not provide insight into why it is occurring. But turning off "Generate the serialization assembly" on the offending project does allow for the build to work in my case.
Start up times will be slower, as serialization will occur at runtime instead now.
You simply need to see what framework you are using and then what debug mode you are using.
In my case i was using framework 4.0 and Build mode target framework "any cpu" but after searching around i found that i need to upgrade my .Net framework from 4.0 to 4.5 and i have to build my solution from "any cpu" to x86 framework because i had Windows 7 SPI with x86 architecture.
Here are some images what i have done to solve this error.
I encountered this error (albeit for a newer .NET framework version, v4.5.1, not v4.0 as in the original question) when trying to build my application on a build server.
The combination of the following two conditions was responsible for the error:
In Visual Studio, on the Project Properties page, on the Application tab, the "Target framework" was set to ".NET Framework 4.5.1";
On the build server, in folder C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework, a folder named v4.5.1 was not present. (Other folders with version numbers, including v3.5, v4.0, and v4.5, were present.)
This missing folder was the cause of the "The reference assemblies for framework ... were not found" warning, which in turn lead to the "assembly with an incorrect format" error.
The fix was to install Windows Software Development Kit (SDK) for Windows 8.1 on the build server. In the install wizard, in the "Select the features you want to install" step, I unchecked all boxes except for the one for ".NET framework 4.5.1 Software Development Kit".
Running that install caused the missing v4.5.1 folder in the Reference Assemblies\Microsoft\Framework.NETFramework folder to be created, and the build to run successfully.
I am reluctant to answer because you say you have already done this, but every time I have struggled with the error message you quote, it has been the MsBuildPlatform setting. It absolutely has to be set to "X86". Are you sure the setting is being set..?
We just converted our javascript files to typescript. Everything builds locally just fine but our build in TFS (cloud version i.e. tfs.visualstudio.com) gave us the error:
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\TypeScript\Microsoft.TypeScript.targets"
was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Locally we are using typescript version 0.9.1.1 and VS2012
And advise?
To ensure that Web projects using Microsoft.TypeScript.targets will build successfully on a build server, you have two options:
Install TypeScript on the build server
Copy the required files for Microsoft.TypeScript.targets to a different source-controlled folder and change the path references in
the csproj file to this folder.
More details here => http://typescript.codeplex.com/workitem/1518
Usually this is because you haven't installed the TypeScript extension on the build server - it will need the same installer you used locally.
This will put tsc.exe into the SDK/Typescript folder and allow the build server to build your TypeScript files and check all your types.
I had to install Visual Studio 2013 RC2 to get TypeScript installed by default and get rid of this error message, instead of trying to download a package.
It can be found here:
http://www.microsoft.com/fr-fr/download/details.aspx?id=42666
This message usually throws when you cancelled the installation of VS or changed the Typescript version or failed to install the Typescript SDK for the corresponding Visual Studio Edition. Download and install the Typescript SDK can get you rid of this error.
Here is the link for downloading SDK for VS2017.
https://www.microsoft.com/en-us/download/confirmation.aspx?id=55258