Cannot create Controller and View in ASP.NET MVC - asp.net-mvc

I have Visual Studio 2010 with MVC 2 installed. I am able to create a MVC 2 Web Application and build the project with the original code. However, I cannot create any new Controller or View page to the project. When I try to create a Controller, I got this error:
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Item Templates\CSharp\Web\MVC 2\CodeTemplates\AddController\Controller.tt(-1, -1): error: There was a problem getting an AppDomian to run the transformation from the host. The process cannot continue."
When I try to create a View, I get this error:
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Item Templates\CSharp\Web\MVC 2\CodeTemplates\AddView\Empty.tt(-1, -1): error: There was a problem getting an AppDomian to run the transformation from the host. The process cannot continue."
I have tried to reinstall the VS and SP1, but that didn't solve the problem.
How can this be fixed?

I had this error this morning in Visual Studio 2010 on Windows 10 while running through an MVC2 tutorial I found. I restarted and reloaded the solution, it created the view right away.

Related

F# - FSI- Load source file "Process is terminated due to StackOverflowException"

I have updated Visual Studio Community 2019 to Version 16.11.4 and when I try to load a source file (i.e.: Library1.fs) into the FSI environment (trough Alt+Enter or writing the #load command inside the FSI environment inside VISUAL STUDIO), I get the Stack Overflow Exception error:
Microsoft (R) F# Interactive versione 11.4.2.0 per F# 5.0
Copyright (C) Microsoft Corporation. Tutti i diritti sono riservati.
Per informazioni, digitare #help;;
#load "C:\Users\GianLuca\Source\Repos\x\x\Library1.fs";;
Process is terminated due to StackOverflowException.
Session termination detected.
This happen everytime I try to “Load” any source file, event an empty source file!!
NOTE: I’m using F-Sharp Library (.NET Framework 4.72), but the same occurs with CLASS LIBRARY (.NTE STANDARd or .NET CORE)
NOTE: if I lunch “dotnet fsi” from the command prompt (cmd) - outside form Visual Studio - and I try to “Load” the same files, it works fine (no Stack Overflow Exception!).
NOTE: I have launched the REPAIR action from the VISUAL STUDIO INSTALLER, but the problem persists.
How I can resolve it? I’m confused.
It seems a problem of F# INTERACTIVE inside Visual Studio Community 2019 Version 16.11.4
Many thanks in advance!
(See also: https://developercommunity.visualstudio.com/t/F---FSI--Load-source-file-Process-is-t/1550593)

Publish Failed to sign msix

Using Visual Studio 2019 to publish an update to an existing windows store application. This worked a week ago.
Our solution builds without error. When I go to create the setup package I get an error "Failed to sign 'D:\dev\MeyerMusic\MeyerTablet\TabletDistribution\bin\AnyCPU\Release\MeyerMusicTabletSetup_2.6.6.0_AnyCPU.msix'."
We are distributing the application as a Microsoft Store app under the existing app name.
Last week on this same development computer I built version 2.6.5 as well as many packages before that.
The error number is blank or missing. I do not have a reason for the failure. I only see one fact in the error message and that points to line 4574 in the file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets
That line is this:
<SignAppxPackage Condition="'$(AppxPackageSigningEnabled)' == 'true'"
AppxPackageToSign="$(AppxMainPackageOutput)"
CertificateThumbprint="$(PackageCertificateThumbprint)"
CertificateFile="$(PackageCertificateKeyFile)"
CertificatePassword="$(PackageCertificatePassword)"
HashAlgorithmId="$(AppxHashAlgorithmId)"
EnableSigningChecks="$(EnableSigningChecks)"
SignAppxPackageExeFullPath="$(SignAppxPackageExeFullPath)"
TempCertificateFilePath="$(TempCertificateFilePath)"
VsTelemetrySession="$(VsTelemetrySession)"
SigningTimestampServerUrl="$(AppxPackageSigningTimestampServerUrl)"
SigningTimestampDigestAlgorithm="$(AppxPackageSigningTimestampDigestAlgorithm)"
/>
Troubleshooting steps:
Attempted to build a side load package. Results in same error
Successfully built a side load package that was not signed
I have restarted Visual Studio
I have rebooted the machine
I have deleted OBJ, BIN for the entire solution
I have looked for errors in the event log but none have been found so far.
After uninstalling KB4535996 the problem was resolved.
I found this via a tip from the following post: https://developercommunity.visualstudio.com/content/problem/934967/uwp-error-failed-to-sign.html

Why would Visual Studio be trying to copy files from outside the project to the bin and how do I fix it?

I've got a ASP.net MVC project using Telerik/Kendo controls running in Visual Studio 2015. I inherited a project form a coworker who passed it to me through Subversion/Tortoise SVN. When I compile the project on my computer, it give me permission errors about not copying to the bin. I tried changing the read only status and security on the bin folder, but I still get the message. I've never encountered this error before. Any suggestions on how to fix this? Where can I control where these files are being copied to? Maybe I can change it to put it in a file that it does have access to?
Unable to copy file "C:\Program Files (x86)\Progress\Telerik UI for
ASP.NET MVC R3
2017\spreadsheet\binaries\net40\Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.xml"
to
"......\WFC\WFC\WFC\bin\Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.xml".
Access to the path '......\WFC\WFC\WFC\bin' is denied.
1. Clean Project.
2. Open Windows Task Manager and kill vbcsCompiler.exe process.
3. Build Whole Solution. and run.
Note:
Kill vbcscompiler.exe when u see access denied. I think it's bug in vs17.
You are using telerik dlls in your solution, That's why it's pulling in your solution.

"The process cannot access the file" error when publishing projects in VS 2017

from time to time when I publish my visual studio 2017 projects I get the "the process cannot access the file" error on some of the dll's . The error is pasted below. Does anyone know what is causing this.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Web\Deploy\Microsof
t.Web.Publishing.Deploy.FileSystem.targets(96,5): error : Copying file obj\Debug\Package\PackageTmp\bin\EntityFramework
.dll to C:\Websites\MyWebsite\bin\EntityFramework.dll failed. The process cannot access the file 'C:\Websites\
MyWebsite\bin\EntityFramework.dll' because it is being used by another process.
There is no pattern on the occurance of this error. It occurs randomnly on different dll files.
When this error occurs, I restart my visual studio / computer and then try another publish and it starts working.
Does anyone know what would be a permanent solution to fix this?
Before you publish, select target location different from default location. This will avoid "the process cannot access the file"

"Csc.exe" could not be run. Access is denied (MSB6003)

I just downloaded and installed Xamarin and selected the ASP.NET MVC template. I haven't touched anything. When I build the solution I get the following error:
Could not add packages.
"The specified task executable "Csc.exe" could not be run. Access is denied (MSB6003)".
This is at the end of messages displayed on the Package Console:
Added file 'packages.config'.
An exception was thrown while dispatching a method call in the UI thread.
I'm running Windows 8.1 and Visual Studio Community 2015.
Any ideas?

Resources