Visual Studio 2013.
I have a solution that builds under Release and Debug configurations (with all project configurations set appropriately to Release and Debug). I have added a custom configuration called "Staging" and set only the web app startup project to this configuration (all other dependencies are still set to Debug).
When I try to build the web app I get...
SGEN : error : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
If I switch the web app project configuration back to Debug it works. I have removed the Staging config from the web app and recreated it based on the Debug config but still have the error.
I've been stuck on this for 3 hours so any help is much appreciated.
Just to clarify, the Staging configuration is exactly the same as the Debug configuration except the startup web app is using a Staging config. This config has been deleted and recreated based upon the Debug config.
I found an answer here...
http://hashtagfail.com/post/5255977780/sgen-loaderexceptions-error
Debugging SGEN didn't reveal anything, but I disabled xml serialization since it appears it's only useful for Release builds.
Related
When I starting the project the following error appears:
The project TestProject.Android needs to be deployed before it can be started. Verify the project is selected to be deployed in the Solution Configuration Manager.
In the Configuration Manager Build and Deploy configurations enabled for Any CPU.
Note: reproduce only on Visual Studio 2019. On the previous version (2017)
all works as expected.
You can simply change the settings in your Solution as:
right-click the Solution -->then go to "Configuration Manager" -->then check "deploy" for your required platform project.
Hope!! It will work..
I have a Service Fabric project with multiple services. When i try to deploy it, i get the following error:
The active solution configuration is not configured to build or deploy
the Service Fabric Application Project. This can happen if the
solution configuration is not configured to build/deploy the x64
platform which the project requires.
Possible cause 1:
Check in the Configuration Manager for the proper platforms to be set for the projects(x64 is required for Service Fabric). For me that was already correct.
Possible cause 2:
Still in Configuration Manager, check if you have multiple Project contexts for which you can Deploy and all check boxes are unchecked. If yes, select the project you want to deploy and then try deploying again.
Possible cause 3:
Make sure the project(s) you have set to Deploy is(are) Set As Startup Project(s). And in Configuration Manager the checkboxes Build and Deploy are ticked for this project.
The Service Fabric project has to be set as startup project and it's configuration has to look like below:
Service Fabric project(right click) >>> Properties >>> Configuration Manager
The problem is caused by an incorrect project-type GUID in the .sln file. The line stating:
Project("{guid}") = "YourCode.Tests", ...
will have the wrong guid on it.
This happened for me when upgrading MSTest projects from .NET Framework to .NET 5.0.
Easiest solution is to go into Visual Studio Configuration Manager, and change the Configuration dropdown on the affected project from Debug to Release and then back to Debug again. You will see that the project guid is changed in the SLN file to match the project type and it will start working.
Another possible cause: The name you pass to RegisterServiceAsync is already in use by another service deployed on that cluster (copy-paste-error?).
I am creating a module on Dotnetnuke project template, and i want to make the release of that module. But when I select "release" from dropdownlist and after that click on debug button. I got an error below on iis7 and windows7.
Unable to start debugging on the web server. The web server is not configured correctly. See
help for common configuration errors. Running the web page outside of the debugger may provide further information.
I don't understand why it comes.
If you are trying to DEBUG, you shouldn't choose RELEASE from the dropdown list, that will build the module in RELEASE mode, not DEBUG mode.
You should also check to see if you have enabled Debugging in the web.config of your DNN Development site.
Update:
If you want to package the module, after choosing RELEASE from the dropdown list, choose BUILD not the DEBUG option in visual studio.
One other consideration is to ensure that your web.config compilation node is set to debug="true". This is of particular interest if you configSource this setting into a separate file.
I installed Visual Studio Web Deployment Projects 2010 and added a deployment project to my solution. When I build the deployment project, it does not apply the web.config transform file for the specified configuration.
My web app project has the following files:
Web.config
Web.Debug.config
Web.Release.config
Web.Stage.config
I have tried to check the "Enable web.config file section replacement" but that seems to not make a difference. I even tried checking "Use external configuration source file" but that didn't make a difference either.
I've tested the config files using MSBuild from the command line and they work as expected.
Do web deployment projects support config transformations? If so, how do I get them to work?
I was unable to get this to work and used Web Deploy functionality instead. Web deploy supports web.config transforms and seems to be a bit more flexible than web deployment projects.
Whenever I publish my MVC web application in VS 2010 via the One-click publish feature (I'm not doing any web.config transforms or anything fancy - yet!). The next time I come to build the app I get the following error:
It is an error to use a section registered as allowDefinition='MachineToApplication'
beyond application level. This error can be caused by a virtual directory not being
configured as an application in IIS. in ...MyWebApp\obj\release\package\packagetmp
\web.config
A new copy of the web.config file is indeed created by VS2010 below the ...MyWebApp\obj\ folder so I deleted the whole obj folder and I was then able to build again.
But I shouldn't have to do that each time I publish - I must have something configured incorrectly - can anyone help please.
Thanks.
This is unfortunately a known issue with Publishing a web application to the file system. This still affects the release version (RTM) of Visual Studio 2010. It's not limited to the Beta or RC versions.
This problem "bit" me also, and I too was having to manually delete the Debug and Release folders inside the obj folder within my web site solution folder.
The real answer for an automated "workaround" can be found in this answer to the other Stack Overflow question:
Why do I randomly get a “error to use section registered as allowDefinition='MachineToApplication'” when building an MVC project?
In a nutshell, you need to delete the web.config files from either the Debug or Release folders (or both!), and that's achieved with a pre-build command (configured in the Build Events tab of the Project Properties page of your solution):
del "$(ProjectDir)\obj\Debug\Package\PackageTmp\web.config"
del "$(ProjectDir)\obj\Release\Package\PackageTmp\web.config"
Personally, I delete the entire obj folder since all those files are re-created with each build anyway.
I have just found a work around for this that has worked for me, open the .csproj for your web project and change the node under the Project\PropertyGroup node to this:
from this:
<MvcBuildViews>true</MvcBuildViews>
to this:
<MvcBuildViews>false</MvcBuildViews>
This has worked for me, hopefully it will work for you also.