I create an application using Microsoft Visual Studio 2019 Preview (version 16.3.0 Preview 2.0). After I published it using CLI, application does not start on consumer's machine without an error.
When tried to start using CLI consumer gets this error:
But .NET Core 3.0.0 preview runtime is installed
When I publish as full package (with all libraries placed in the app's folder) app is working OK.
I have no idea what is wrong.
There is an open issue in dotnet/wpf repository about it:
https://github.com/dotnet/wpf/issues/656
Probably current workarounds are:
Deploy app as self-contained.
Install SDK on client machine.
Related
I've developed an application in .NET 5.0, also, I've a Setup Project to install this application in my clients.
My steps are:
1.- Publish the .NET 5.0 Application.
2.- Compile the Setup project.
3.- Install the setup.exe generated in "2" in the client.
But when I try to install the program in my client, windows says "This installation requires the 5.0.0(x64) version of .NET Desktop Runtime... So I've to download and install the SDK in every client.
My question is: There is some way to avoid this SDK installation? Can I embeed the .NET Desktop Runtime in the .NET 5.0 App or in the Setup Project?
Thanks in advance.
See .NET application publishing overview, specifically publishing a self-contained application. That way all necessary framework files will be included in your application, and you will not the framework to be installed. This will increase the disk requirement a bit if .Net 5 is already installed, since some files will be duplicated.
The alternative is to bundle the the .Net framework installer in your installation script. This will cause the setup-file to be quite a bit larger, unless the script downloads the framework on demand. But it may save some disk space in case there are multiple applications that use .Net 5.
Go on projet Menu/ projetct properties / publish / require components / uncheck you frameWork .
I published my program(.net core 3.1 winform program). but it doesnt excuted even installed .net core 3.1 run-time package. so i install .net core 3.1 sdk package, it works.
why i install sdk instead of run-time package?
The software development kit (SDK) includes everything you need to build and run . NET Core applications, using command line tools and any editor (including Visual Studio). The runtime includes just the resources required to run existing
There was a problem creating a single file by using app.config in the wrong way.
When app.config was used in the correct way, it was confirmed that it works normally only with the runtime sdk.
Previously, both *.dll.config and *.dll were required, but after correcting it, only *.dll.config worked normally.
I'm trying to run the default vanilla ASP.NET core website from VS, on my windows server 2016 instance. But when I run it I get a HTTP 502.3 error
I enabled logging from the web config, the logging message I get back is
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
I've install the windows hosting bundles
https://dotnet.microsoft.com/download/dotnet-core/2.2
https://dotnet.microsoft.com/download/dotnet-core/2.1
The CSProj is targeting the netcoreapp2.1 runtime
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
The hosting bundle is for IIS proper, when deploying an already compiled ASP.NET Core app. In Visual Studio, you're running against IIS Express and the source code needs to be compiled to deploy it there. That requires the SDK; the runtime is not enough. Download the .NET Core SDK and you'll be fine.
The default publication was using 'portable' as a target runtime, which requires the SDK to be installed. Switching it to match your machine architecture, 'win-x64' in that case, enables it to run with simply the proper dotnet runtime installed.
Issue
I have been unable to build and run any dotnet core application from Visual Studio 2017 (15.5.2). Every time I attempt to run it, VS2017 immediately goes into Break Mode, and stops debugging when I hit continue.
This happens even when I use the New Project from VS2017 and choose a .NET Core template (Console App or ASP.NET Core Web Application).
I have followed Microsoft's directions at Build a C# Hello World app, and have completed the instructions at Prerequisites for .NET Core on Windows.
What I Have Tried
Uninstalling and reinstalling the .NET Core cross-platform development workload in VS2017.
Removing all .NET Core SDK versions from Programs and Features and reinstalling from .NET Core 2.x SDK
What I Can Do
Navigate to the source directory and run dotnet run in Powershell. This successfully runs the application in the terminal.
If I guess the dotnetcore PID correctly, I am able to attach to the running process in VS2017.
Open the project in Visual Studio Code. After VSCode creates the build configurations, it is able to build and debug the code.
I do a majority of development in VS2017, and would prefer to use it for dotnet core as well.
dotnet restore
is very likely to be your best friend. If any files are missing they can be easily recovered in this way. For example, when I created a new VS2017 ASP.NET project I kept getting "System could not be found" errors throughout until I executed the restore command, and now I am on my way. Have you tried that?
Visual Studio 2005
I have developed an application using C#. I have created an setup application, and included the .NET Framework 2.0 on the CD.
I am not using ClickOnce.
However, one of our clients is complaining that they cannot install as it's asking
for Windows Installer 3.1. However, I didn't exclude that from the setup project.
To do a complete test I decided to install some VMware that didn't have the .NET framework or Windows Installer 3.1 (just a skeleton Windows XP). The application installed OK.
What is the Windows Installer 3.1? And why do I need it?
Windows installer is the software that is able to run MSI files. It comes (in some version) with Windows (starting in Windows 2000 SP4). In each MSI file, the minimum installer version is defined; installer will complain if the MSI is "too new". The Windows SDK has a table showing what installer versions where included in what Windows releases.
You can get the 3.1 redistributable from Microsoft.
You need it to install .NET framework 2.0.
Please check this download link.
Its System Requirements says:
System Requirements
- Required Software:
o Windows Installer 3.0 (except for Windows 98/ME, which require Windows Installer 2.0 or later). Windows Installer 3.1 or later is recommended.
o IE 5.01 or later: You must also be running Microsoft Internet Explorer 5.01 or later for all installations of the .NET Framework.
EDIT : You can make sure in your setup project that all the prerequisites for your project exists in your Setup Package. You can find a step-by-step how-to in this CodeProject article..