I'm trying to scaffold Identity in my Asp.net MVC project, but I always get the error:
There was an error runnning the selected code generator: 'Package restore failed. Rolling back package changes for 'myProject'
I read that some people resolve that issue with clicking on the 'update all' button but I can't do that because i am using .net6 and some packagas upgrade too were they depend on .net7
I have tried updating all relevant dependencies to the same version, but still no luck.
Any suggestions or ideas that I can try?
Related
I'm trying to start a Grails 4 application in Intellij, the project is configured with Java 8 and Gradle seems to be loaded correctly, but it gives me the following error:
error: Could not find or load main class org.grails.cli.GrailsCli
Is there any know method in which I can get around this problem?
First, check if the language level and SDK are correct (File > Project Structure > (Project/Modules) > Language Level)
From 360learntocode' blog post:
This might be due to the removal of some dependencies or libraries
from the application. Sometimes, while loading multiple applications
from IDE while downloading the library for a particular project other
libraries for another project might remove so this kind of error might
occurs for that project.
Let's first delete the build folder under the application.
Now, let's refresh the Gradle project. Here we are using IntelliJ
Idea, we can refresh the project as below
Image description:
Click Gradle on the right tab;
Select the project;
Click refresh.
After refreshing the project it will download the missing
dependencies. Then run the application which will resolve the problem.
We can also try cleaning the application.
If we are using the command line then type the following command to
clean the application.
grails clean
If we are using the IntelliJ idea then Ctr+Alt+G opens the command
window and use the following command.
clean
Now, re-run the app.
Immediately I click on create and the project loads. I always receive the below error. I cannot do anything without correcting this.
This is the error:
Severity Code Description Project File Line Suppression State
Error NETSDK1004 Assets file 'C:\Users\HARBIORLAR PC\Desktop\VB Web Projects\BookList\BookList\BookList\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. BookList C:\Program Files\dotnet\sdk\3.1.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets 234
Screen shot of the error:
This is what i did and it works,I Enable automatic package restore by choosing Tools > Options > NuGet Package Manager, and then selecting Automatically check for missing packages during build in Visual Studio under Package Restore.
Then I build the project with internet connection on and the missing file was downloaded.
This the Screen shot After successful
Whenever I try to run my MVC project in VS 2019 i am getting a Exception Unhanded error (Image is below). I have tried to create a new project and that works fine. I did not make any changes, the project ran fine and then I stopped it and re ran it and I got this error.
Error Image here
Make sure VS is run as administrator, and your account has access to the file hostsettings.json.
I tried to build my existing MVC application with MonoDevelop. The error I get is this:
Error: Error building target IncludeRoslynCompilerFilesToItemGroup: Item has already been added. Key in dictionary: 'Link' Key being added: 'Link'
The project has been developed on another machine running Windows and using VS2017 and the error I get when running the project on my machine running Linux.
The command grep IncludeRoslynCompilerFilesToItemGroup * -R in my terminal returns packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.5/build/net45/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props: <Target Name="IncludeRoslynCompilerFilesToItemGroup" AfterTargets="ResolveAssemblyReferences" >
But I'm stuck at this point. Do you have any recommendations about what should I do next to solve this error?
based on this answer one possible solution is to remove these references from your project:
Microsoft.Net.Compilers
Microsoft.CodeDom.Providers.DotNetCompierPlatform
If I create a New Mono Android application, then change the Active Config of the solution to Release, then right click and choose build, the application builds fine.
If I then add a web reference to http://soatest.parasoft.com/calculator.wsdl as per this tutorial, then if I build again I get the error:
Error 1 Could not load file or assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
C:\Users\Administrator\Documents\Visual Studio 2010\Projects\MonoAndroidApplication3\MonoAndroidApplication3\SGEN
If I change the Active config back to Debug then build, then the solution builds fine.
However, I cannot get the Release config to build at all when referencing any web service. This is causing me problems as I can't deploy a release version of my application.
I have tried using VS2010 and MonoDevelop 2.6 Beta 2, both give the same error.
I can't figure out why this is happening, but you can workaround it by going to the Build tab of your project properties and turning off "Generate serialization assembly".
Generate serialization assembly prevented you from building.
I got the NameResolutionFailure when selecting Release target because i didn't set the INTERNET permission in the application's options:
right click your project
select options
select the left item "Mono for Android Application"
set Required Permissions: "INTERNET" by checking the checkmark next to it.
It seems that this is active for debug builds since it's used to connect the debugger to the application.
You have to set this yourself in the Release build configuration.