I am creating a new project from Visual Studio 2015, a Service Fabric Application, picking up the one for ASP.NET Core, but it does not work when I trying to start it.
I'm running under admin power on VS, I tried to reset VS and computer, reset Service Fabric local cluster, and it's still the same. Then, It's strange but the template for API is working perfectly for me.
For me, it seems to be a problem building the executable, and then it's complaining that it doesn't found it, I took a look to the bin folder, and it's empty.
I attached a picture to describe the error:
I'd appreciate whichever advice/comment/tip/attempt to help me, thanks
EDIT: Added pic with the template which is causing the problem
EDIT: Added pic off the project.json
I'm really pissed off with this bug, I change the references to preview 1 to preview 2 and same error, Seriously nobody more has this error? I tried to uninstall and install SF SDK once again, but still the same, I need to fix it, Any ideas??
Compiling against rc2 can cause this issue.
Execute dotnet --version inside project folder to confirm.
Add global json referencing preview2 will get you up and running.
Related
enter code here
enter image description here
I'm having a problem when trying to compile and build an ASP.NET Web API project targeting .NET6.0. For some reason MSBuild is failing with the given error. I tried to change the access permissions for both /obj and /bin folders but I'm still getting the same error. However, this only happens when I try to build the project in a Debug mode, and it's working perfectly fine in Release mode. Any help would be highly appreciated!
Searching in the other stackoverflow questions (the same issue for net core 6 razor pages), it seems that deleting the bin and obj folders, and rebuilding your solution works. And also restarting your computer seems to work. I still have this issue even though i have tried both solutions.
I have a functionapp that I made in visual studio 2019. I want to publish this app to an azure function that already exists in Azure. But when I try to publish from VS I get the following error:
I tried to update VS to the latest version and updating the Microsoft.NET.Sdk.Functions packet to version 1.0.35 since the following versions require .NetCore 3 and I use .NetCore 2.1. I also tried to do a Webdeploy but got the same error.
When I changed my .NetCore version to 3.1 and do a WebDeploy I now get this error:
I looked this up and people said to change the WEBSITE_RUN_FROM_PACKAGE value to 0, I tried this and even tried deleting this and it still gave the same error.
I also tried ZIP-deploy and then I get this error:
I also edited the runtimesettings when I changed the version.
My project structure:
In the map IntentFunctions are 6 other azure functions.
Even creating a new app service from VS and then publishing doesn't work.
I saw that most other azure function apps have a json file for each function and I do not have this only a host.json file, might this be the problem?
Anyone know a fix?
Thanks in advance
I do not think your problem is the version of the Function. Framework version would be the problem if the application was deployed successfully but could not start. Your problem is that the ZIP package can not make it to the server, according to the logs.
I had a similar problem before when deploying from VS from home, the problem was slow home internet connection.
Here is the link that helped me:
Publish to Azur fails with 500 internal Server Error
Updated Answer
I generally distrust visual studio because it is doing a lot of stuff under the hoods and caches a lot of data to boost performance. You can instead try to use another mean of publishing as explained by Microsoft here https://learn.microsoft.com/en-us/azure/azure-functions/deployment-zip-push , like a rest call or azure cli.
It seems like Azure Functions default to use .Net Core 3. If you want to change the version, according to this link: https://learn.microsoft.com/en-us/azure/azure-functions/functions-versions , you should be able to change the FUNCTIONS_EXTENSION_VERSION application setting to ~2.
Also you can set the AzureFunctionsVersion in your .csproj like so: <AzureFunctionsVersion> v2 </AzureFunctionsVersion>
I recently bought a new computer. After getting everything setup, I installed visual studio community 2019 and gitkraken and cloned down my project(which was building and running fine prior to changing computers) and I'm running into an issue. It's a game dev project using MonoGame.
These are the errors that I'm receiving currently. I've tried multiple versions of MonoGame including 3.0, 3.5, and 3.7. I've attempted to reinstall redistributables, I've cloned into multiple directories, I've attempted building a different project(a fork of the same project that I've worked on more recently on my previous pc). I have a friend that works on the project with me, he was able to clone into a new directory and build immediately. I've attempted building the content package in the MGCB manually and am also running into an issue where it's not finding a specific font file(that i've verified is installed on my computer, and also tried dropping in the correct directory for building, but have had no luck there. However, I feel like this is a separate issue, but it may provide some insight to someone who is more experienced than I.)
Ideally, this project should clone down and build just fine on a fresh install. It always has before, but there's something going on here that I'm not sure about. I've tried several different things and have hit a wall. There isn't much online about this specific issue that I've seen, so if anyone has any ideas I'm all ears. Thanks.
I figured out the issue. It was something simple as usual, a product of my own stupidity. When I first downloaded the font, I extracted and right click > install. So the font was installed on the PC. I spent a couple days on this issue, and at some point when trying to reinstall the font there was a new option that hadn't been there before called 'Install for all users' with the shield icon next to it. Previously, I'd only had the option to 'Install' without the shield icon. Not sure exactly what the difference is between these two options showing up, but once I clicked 'Install for all users', the issue was solved. So I guess initially the font was only installed for my specific user account. I'm not sure why this is an issue or why the option to install for everyone wasn't available previously, but this is what solved the problem.
Change the Build Action on the "Content-> Content.mgcb" file to "none" or "ignore"(I can't remember which). This will allow the game to build successfully.
Here is a temporary work around to allow you to continue development:
If the XNB files are not properly building in the Pipeline tool, you can copy them(from an older build or compile them on another machine) into the output directory, Content directory under the directory containing the .exe file, manually.
I created a new WPF project. I copied the built .exe file onto another computer and tried to run the application. But nothing happened. It was just loading. Nothing more.
All my WPF projects do this thing.
What am I doing wrong? Has anyone any idea?
Edit: For somebody in the future: the question might not be clear. What I meant was that I created a simple WPF application with nothing in it and tried to run the application on another computer. I wasn't able to make it run. Just nothing appeared. I figured out that the Avast Free Antivirus was causing this problem. When the antivirus is turned off, it runs as expected. Even though it is no solution, at least we know, what was causing the problem.
You are probably missing the dot net libraries on the target machine.
For quick fix, download the dot net framework distributable for the .net version you compiled against and install it on the target machine. Here is 4.5.1 for example.
For actual distribution, look at creating an installer that will ensure all dependencies are installed with the application. InstallShield has a limited edition which may be included with your edition of visual studio
Try publishing your application using click once. You can do this by right clicking on your project > Publish > Specify the location to publish your application > Finish. Copy the files inside the Published folder to another computer and try installing by click the setup.
Note: The instructions I said above only works if you only have basic functions on your app. If your application uses SQL Server, you need to install it first on the computer that you will be installing your application in.
For your reference. How to: Publish a ClickOnce Application using the Publish Wizard
I have an application that runs perfectly when I run it from Visual Studio. But once I hit "Publish" and try to launch "setup.exe", I get an error message:
This application could not be started. Do you want to view information about this issue?
Clicking on yes leads me here. I have no idea what "SHIM" is and it's definitely not part of the code.
The error is the same if I publish to a network share or to my local drive. Once installed, the application shows up in "Programs and Features" and can be uninstalled but a Start Menu entry is not added. It's as if the error occurs during the installation.
I tried chancing the prerequisites (and target framework) between 3.5 and 4, as well as Windows Installer 3.1 vs 4.5 - no dice.
While it is currently targetting 3.5, it was originally created as a 4.03 app. I did change the target framework a couple times and going back to 4.03 doesn't fix it. I'm pretty sure this issue appeared as a result of retargetting.
Can anyone provide clues where to look?
Take a Look at configuration files if you have any app.config or web.config.
If you didn't find any tag regarding the target framework, Do a File Search on you solution folder and if you find something in .csproj or .sln files, change it to the correct one.