When trying to publish a web site (not application) in Visual Studio 2013 I am receiving the error:
Error 80 Could not find file 'C:\Users\xxx\AppData\Local\Temp\2\Temporary ASP.NET Files\sourcecode\f4add76e\ed4d53d8\App_Web_0ttpvjhk.0.vb'.
If I deploy the website without precompiling it works fine. Also, when running the website locally I (and other team members) have to rebuild several times before it will compile without errors. The errors we receive when trying to run locally usually have to do with duplicate new subs being generated, by Visual Studio, from data table/table adapter xsd files.
I've tried compiling via the command line (aspnet_compiler) to rule out Visual Studio and receive the same error. Any ideas would be most appreciated as we've been trying everything we can think of to solve the issue.
Thank you.
Edit 1
Here is a common error when trying to build the web site locally. Sometimes it builds fine, other times we get an error like this:
Error 81 The file name 'C:\Users\xxxx\AppData\Local\Temp\2\Temporary ASP.NET Files\root\25143ee9\2d39f4f7\ymvk4bug.pdb' was already in the collection.
I ended up finding out what was causing the problem.
I had upgraded from ReportViewer 10 to ReportViewer 11 and the following line was added to the web.config:
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</buildProviders>
This was causing the intermittent build failures. I removed the buildProvider tag and it builds and precompiles just fine.
Related
How can I resolve these errors:
Loading the include file 'EF.Utility.CS.ttinclude' returned a null or empty string.
Value does not fall within the expected range.
Tools Used: VS 2012, Entity Framework 5.0.0, T4MVCExtensions 3.5.0, .NET Framework 4.5
I've been using EF and T4 templates in a project within a large MVC solution without incident. Now, when I right-click on the edmx diagram, EF responds with the message: Value does not fall within the expected range. When I compile the EF project it responds with these messages:
Loading the include file 'EF.Utility.CS.ttinclude' returned a null or empty string. The transformation will not be run. C:\Projects\NSAForms\NSAForms\NSAFormsEDM\NSAFormsEntities.tt
Failed to resolve include text for file:C:\Projects\NSAForms\NSAForms\NSAFormsEDM\EF.Utility.CS.ttinclude C:\Projects\NSAForms\NSAForms\NSAFormsEDM\NSAFormsEntities.tt
Every table in the database has a primary key. I'm struck by how suddenly this issue appeared. Does anyone have some suggestions how to resolve this issue?
Thanks in advance,
Arnold
I had very similar issue and I tried with VS2012 and VS2013.
After reinstalling Entity Framework 6 Tools for Visual Studio 2012
http://www.microsoft.com/en-us/download/confirmation.aspx?id=40762
every thing went back to normal.
In VS 2012, the EF.Utility.CS.ttinclude file will only be installed if the Microsoft Web Developer Tools or Microsoft SQL Server Data Tools component is selected.
Reinstalling Entity Framework 6 Tools for Visual Studio 2012 http://www.microsoft.com/en-us/download/confirmation.aspx?id=40762 work for me
For VS2017, I ended up adding EF6.Utility.CS.ttinclude to model's folder. This resolved my issue with MySql and EF.
File can be found: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF6.Utility.CS.ttinclude
UPDATE To avoid doing the above, removing the entities completely then adding back in fixed the issue.
Had this issue with a recent install of VS2017 Enterprise after already having this functionality working in Professional.
The solution for me was to:
Open the Visual Studio Installer program and "Modify" my Enterprise installation.
Select "ASP.NET and web development" under the Web & Cloud section
Click "Modify" in bottom right
It's probably worth noting that I already had EF6 installed and did not need to re-install it to get this to work.
After completing those steps and firing up Visual Studio, the error went away and I was able to generate my classes successfully. Hope this helps!
Visual Studio 2017
was getting the same error but only in a test project. after reviewing the test project and the other project successfully referencing that file i found that adding the following to the app.config of the failing project resolved my issue
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<connectionStrings>
All of the above solutions did not work for me so I created a new project to see if the problem persists but the error did not occur in the newly created project. I then compared the project with the old backup to check recent changes made and found the problem. I recently had upgraded a package Clarius.TransformOnBuild to more recent version after downgrading the package the error went away.
In my case the issue was caused by a bizarre folder name (with %20 instead of spaces). I just made a directory junction to the same folder with spaces instead of %20 and it solved the issue.
Here is the PowerShell command I used to make the junction:
cd "c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Microsoft\"
mklink /j "Entity Framework Tools" "Entity%20Framework%20Tools"
Junction created for Entity Framework Tools <<===>> Entity%20Framework%20Tools
You can then use ls look at the directory contents, and you should see these two lines (edited for brevity):
Mode LastWriteTime Length Name
---- ------------- ------ ----
...
d----l 2/27/2019 9:57 AM Entity Framework Tools
d----- 2/26/2019 12:24 PM Entity%20Framework%20Tools
...
Under Mode, the l indicates that it is a "link" (aka junction), and the d indicates it's a directory. By making a junction instead of renaming the folder, you can be sure that both directory names will always work.
I work with Visual Studio 11 Beta (MVC3 + .Net 4.0). I deployed the project to the IIS 7.5 (MS 2008 Server), when I generate a report, I've got the following error:
System.IO.FileNotFoundException: Die Datei oder Assembly "Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" or one of its dependencies was not found. The system cannot find the file specified.
On my local developer machine I can't find the "Microsoft.ReportViewer.Common.dll" Version 11.0.0.0 only 10, but local it works fine! :(
I had the same problem and I followed these steps!
Hope this helps.
To summarize the link, go to the GAC from the command line and find your problem DLLs:
C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\Pick_A_Framework_Version\Microsoft.ReportViewer.Common.dll
C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\Pick_A_Framework_Version\Microsoft.ReportViewer.ProcessingObjectModel.dll
and possibly:
C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\Pick_A_Framework_Version\Microsoft.ReportViewer.WebForms.dll
C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WinForms\Pick_A_Framework_Version\Microsoft.ReportViewer.WinForms.dll
Copy those dlls to your bin folder, and you should be all set.
curlackhacker's suggestion got me past the error, but then exceptions occured with internalRender. I suggest using my answer as a last resort because I can't explain exactly why it works, but this is the only thing that worked for me:
Install report builder on the server.
Note: this solved the same problem in .net 4.0 IIS 7 and the project was a webservice, so as I said, try curlackhackers solution first.. Good luck readers.
I am trying something here but keep failing.
I have Visual Studio Developer Preview installed on a Windows Server 2008 R2. As you know, for now VS extensions are not compatible with VS 11 Dev Preview but I found a workaround:
Visual Studio Extensions and Visual Studio 11 Dev. Preview
I installed ADO.NET C# DbContext Generator on VS 11 but when I try to run the code generation, I am getting the following error:
Error: this template attempted to load component assembly
'Microsoft.Data.Entity.Design, Version=10.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'. For more information on this problem
and how to enable this template, please see documentation on
Customizing Project Templates.
I checked from the add reference page, there is no dll like above.
Any chance I can get this work with VS 11 Dev. Preview?
Ok, I solved the problem but I am not sure it is legitimate or not.
when you unzip the extension, navigate to T/code/ folder inside that, there is a zip file called DbContextCS.zip. Unzip that as well, and you will see file called ADONETArtifactGenerator_DbContextCSharp.vstemplate
Open this up with text editor and change this code:
<WizardExtension>
<Assembly>Microsoft.Data.Entity.Design, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
<FullClassName>Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.AddArtifactGeneratorWizard</FullClassName>
</WizardExtension>
To this one:
<WizardExtension>
<Assembly>Microsoft.Data.Entity.Design, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
<FullClassName>Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.AddArtifactGeneratorWizard</FullClassName>
</WizardExtension>
Pack everything back together and install the extension, when you run the code gen., you will have no problem.
When I first launched the Visual Studio (I just installed it) I choose the default programming layout (Visual C#/Visual Basic.NET/ F#/etc) as Web Development. It gave some error that it couldn't find the layout scheme or something and now it says Cannot Open Window.
Is there some way to reset the selected layout option?
I has the same error when I installs MySql Net Connector mysql-connector-net-6.3.4.msi
I think that this installer corrupt my VS 2010. But NOT.
Previous, I uninstall MySql Connector 6.3.2 and edit machine.config... this was the error!
<system.data>
<DbProviderFactories>
<!-- !!! aƱadido a mano para poderlo usar en VS2010
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net
Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory,
MySql.Data, Version=6.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> -->
<add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/></DbProviderFactories>
</system.data>
The logic comments not is OK. Then, I erase all commented code and VS2010 come to the live, again!
In my lab the Visual Basic was working fine last semester, but this semester got that "Cannot create the Window" message. After trying reinstalling the VB, Visual Studio, .Net, and other things always got same message. Found a site that mentioned missing windowscodecs.dll file in the windows\system32 directory, but I had the file. Found a different date on file on machines witch the VB was working. Copied the newer windowscodecs.dll file, and that got rid of the problem, but later found I also had to copy the windowscodecsext.dll file as well.
Am now doing a comparison between the two systmes using sigcheck on all the files in system32. Have found a large number that report the Signing date: 12:07 PM 4/14/2008, but the other system has Signing date: 12:13 PM 4/14/2008. Haven't checked the actual contents to see how different the files are. Would be nice if there was a method to check and update to the latest versions.
I've had a similar problem with Visual Studio 2010 Express - restarting the computer solved it.
Similar error message here when starting up a freshly installed VS2010 Premium.
I had copy pasted stuff from old machine.config, but accidentally left out one Section-definition. Fixed by adding the missing definition into configSections-block.
Problem might be due to some issue in machine.config. Try to replace the config with the original and try.
This resolved for me.
My debugger is not working,
I'm putting a breakpoint, but in run, time visual studio doesn't stop on the breakPoint.
How to fix it?
There is nothing special in my application, it is a simple web application.
I am using visual studio 2005.
I've created a new web application project, and on the default.aspx page there is a obout grid control, on the default.cs i am filling a datatable and putting it as datatasource for the grid.
I was able to debug it, suddenly the debugger is never hit.
note that the debugger is on the load event.
Find below the steps that solved my problem:
Delete ASP.NET temporary files from C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
Change build configuration to debug from project properties.
Delete bin folder from your project.
Check if compilation debug is set to true in the web.config
iisreset
Rebuild the project.
There are a couple of things that could be wrong:
Your source code and assembly could be out of sync - rebuild the application and try again.
You could be attached to the wrong process - check to see what process you are attached to.
There could be a logical error in your code that is causing your breakpoint to not be hit (i.e. the method you are in is not actually called, logical branching is routing control around the breakpoint, etc.)
Break point was not getting hit, i cleaned and rebuild, but still not hitting, I just reopened the page (In my case Controller) and started working fine ..
When everything failed try this:
Right mouse button on your project -> Build -> untick 'Optimize code'
Or
I had similar problems when I've installed dotPeek and maybe because I don't have Resharper it was loading symbols from dotPeek symbol server but it couldn't hit my breakpoint. In that case Open dotPeek and click on Stop Symbol Server.
The symbols probably aren't loaded, that's why the breakpoint won't be hit. Did you set the website as the startup project?
When debugging, what process it attached? It should be w3wp.exe if you want to debug asp.net code.
You might need to set your application in web config so that it can be debugged..
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
You need to be running in Debug mode, and not Release mode.
Here's a detailed article about How to: Enable Debugging for ASP.NET Applications Basically, you can either set debug mode in project properties or in web.config.
try uncheck "Enable the Visual Studio hosting process"
that in project properties -> debug
worked for me
This can occur when Visual Studio is set to debug Managed code but the code is not managed (managed code is running under the control of the common language runtime (CLR)).
To fix the problem change the debug mode as shown in the right hand side of the figure below to Native only, Mixed, or Auto.
Side note: I recommend not choosing Mixed unless your system has both managed and native code (code that does not run under the CLR) because Visual Studio can't attach to an already running process in mixed mode. To debug an already running code Visual Studio need to be set to debug in Native only or Managed only.
I've seen the already existing answers have listed many possible causes, but I'd like to add one more: if you're using post-compilation tools (such as ILMerge), check whether those tools keep your debugging information (is there a .pdb file? or maybe you have embedded it in your compilation output). For those ones who are actually using AfterBuild tasks in their .csproj I really suggest to check out.
You can enable Debug as below steps.
1) Right click project solution
2) Select Debug( can find left side)
3) select Debug in Configuration dropdown.
Now run your solution. It will hit breakpoint.
Are you debugging using IIS Express instead of IIS Local. I found IIS Express sometime won't hit debug points, IIS Local works fine.
You could be like me to have both a production version (installed via a msi file) and a development version (opened in Visual Studio), and that is why I cannot get some of my breakpoints in the VS triggered today.
If that is the case you need to uninstall the production version as I think some of the dll files are interfering with my debugging session.
Clean and Rebuild your solution afterwards should fix the issue.
if you are using publish and IIS, then check your Publish configuration, make sure it says Debug
Go to publish window
[1]: https://i.stack.imgur.com/X9Dke.png
In Visual Studio 2010
Select Build > Clean {Project Name}
Rebuild Project
Now Try to rebuild project and try debug
All the best
After installing following add-on it started working. After installing, restart visual studio once. Install plug-in as per VS version.
https://download.qt.io/official_releases/vsaddin/