Something came up, and I had to restart my computer unexpectedly. Visual Studio was open, but minimized.
Now when I open my project, it can compile and run, but I can't edit the resource with Resource View.
When I try to expand the resource in Resource View, I get the following sequence of errors:
{VSInstallationDir}\VC\include\sal.h(2872) - warning RC4005: '__useHeader' : redefinition
{VSInstallationDir}\VC\include\sal.h(2882) - warning RC4005: '__on_failure' : redefinition
\MyProjectName.rc(199) - error RC2104: undefined keyword or key name: WS_EX_NOINHERITLAYOUT
When I click on OK, I see this error in Resource View tree list: Load Failed.
I searched the net but no one had the same exact problem. Can you please help me?
The problem was fixed.
First, I clicked on Edit Code button and the source appeared. I went to line 199 and found WS_EX_NOINHERITLAYOUT and removed it. When I reopened the resource, the last error was gone.
I reopened the whole project and all errors were gone.
Related
I have a Blazor web project, and am getting errors on one rather large page file when I build. There are no errors if I close and relaunch VS 2022, until I build. Then, it says there are 2 errors ("} expected" and "; expected"), but it shows them in the .g file, and when I double-click on the error line in the Error window, nothing happens.
How do I trace to where in the source code the bad lines are? There are 1300 lines of code in this page...
In blazor (VS2022 current version) don't look at the errors tab, always check the "Output" tab, you'll find the errors there, and double clicking on them usually will get you to the correct line.
the .g files are generated code:
error the in razor.g.cs file, can't find in VS, can't find the _razor.g.cs file
I had to close and relaunch Visual Studio a couple of times, now it shows the error on the correct .razor page file. Apparently CodeLens and syntax checking are very flakey in Razor pages. Once these 2 errors were resolved, went away, and there were no more errors - I did a Build, and it came up with another "; expected". Which of course was resolved by closing and relaunching VS, reopening the solution, and waiting for CodeLens to check the opened file. Then the error came up.
There are code issues I have no idea where to start on fixing straight out of the gate after downloading and opening Acquaint. I have current versions of Community VS 2105 and Xamarin.
If someone wants to give it a shot, here is the address where the download is at: https://www.xamarin.com/prebuilt?utm_source=visualstudio&utm_medium=referral&utm_content=ios-prebuilt&utm_campaign=vs
I have restored the NuGet packages for the project, and I don't know what else to do. I read that I should should delete things out of the Xamarin folder, and then restart? But I'm not clear about what to delete.
I have not been introduced to solving these kinds of errors. Thanks ahead of time to anyone trying to help me figure it out.
UPDATE: I restarted Visual Studio once and I got these two errors: "C:\Users\GAR\AppData\Local\Xamarin\Xamarin.Android.Support.Design\23.3.0.0\embedded./ doesn't exist." AND "C:\Users\GAR\AppData\Local\Xamarin\Xamarin.Android.Support.Design\23.3.0.0\embedded\classes.jar doesn't exist." ... Then I restarted Visual Studio for the second time, and those two errors disappeared, and now here is the screenshot of errors and code the only red error is "No resource identifier found for attribute 'layout_scrollFlags' in package 'com.xamarin.acquaintforms' Acquaint.XForms.Droid C:\Users\GAR\Desktop\acquaint\app-acquaint-master\Acquaint.XForms\Acquaint.XForms.Droid\Resources\layout\toolbar.axml ", and the only IDE* yellow Warning error is "IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled."
This message
"The 'android.support.v7.widget.Toolbar' element is not delcared"
shows when hovering over the 'code' android.support.v7.widget.Toolbar
Visual Studio 2013 Professional just started throwing this error on me, in the middle of switching solutions. A full reboot of the computer didn't resolve it.
Here's the error I see when I try loading a solution:
Now, when I go look at the log file it suggests, I see this:
SetSite failed for package [JavaScriptWebExtensionsPackage]
End package load [JavaScriptWebExtensionsPackage]
If I click "Yes" to continuing to show the message, and try loading up a file in the solution -- I get this message:
Telling me that No EditorOptionDefinition export found for the given option name: Tabs/ConvertTabsToSpaces - Parameter name: optionId.
I really do not know what to make of this. I didn't do anything except check in some files to TFS (which I do dozens of times a day, a week, a year). The only thing I ever did differently that I never did before was attempt to view Source>Annotations on a file (I've never did that in my life with TFS/VS) about 10 minutes prior - but that worked fine and was just ducky.
So - any ideas why I'm getting this message - and how to resolve it without a fullblown re-install?
So -- after posting this and adding that last screenshot (the No EditorOptionDefinition export... business) -- I decided to google on that phrase as well (the other key phrases brought me nothing).
It brought me to this page:
No EditorOptionDefinition Export Found Error
Which actually fixed the problem.
In short:
Close Visual Studio
Open the %UserProfile%\AppData\Local\Microsoft\VisualStudio\<version>\ folder
Rename or delete the ComponentModelCache folder
Restart Visual Studio.
I had the same problem, All i did was went to Control Panel and ran a Repair on VS 2013. Waited for it to complete and restart my computer and it worked.
In my case above solution not work out but when I tried to delete everything from
%LocalAppData%\Microsoft\VisualStudio\14.0\
from above location then I restarted visual studio 2015 then it works fine.
Hope anyone having this issue may resolve deleting everything from 14.0 directory
thank you
I had the same experience. Deleting %LocalAppData%\Microsoft\VisualStudio\14.0\ worked fine. I could not delete for permission reasons so had to delete from command line all files in 14.0.
I have a project in windows application than was in VS2008. Now I convert it to VS2010. When I want to run my project, I get this message:
"This application has failed to start because the application configuration is incorrect. Review the manifest file for possible error."
How to I can run my application?
Thanks.
I had the same problem where my entire C# solution was created in previous version and it did not work in new VS.Net version giving the same error. Here are a few things that will help you resolve the problem
Expand the References Item and check if any item has a warning symbol attached to it.
If (1) , click on References->Add Reference and try to add the reference which has the warning. Now the warning sign has to go away.
If the references displayed in 'Add reference' dialog box is grayed, you should probably get the reason by hovering next to the reference.
For me it was grayed and it clearly mentioned that the component is not compatible with the current .NET Target runtime. Right click on Project -> 'Properties' and try to change the .NET Runtime and give a shot by compiling the entire solution and try to execute it.
If it still fails , try looking at eventviewer logs by going to Start->Run->Eventvwr
This should be a good way to debug this problem.
Honestly...I deleted the App.config file and Re-build. And started working.
Without understanding what was going on, I was able to fix this issue for a Windows Forms project I had just converted from VS.Net 2008 to 2010.
After conversion the Target Framework was still .Net Framework 2. When I changed it to 4.0, my application could be started and debugged.
In then noticed a new line in app.config:
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
So, just for the sake of interest, I changed the Target Framework back to 2.0 and the line changed to:
<startup><supportedRuntime version="v2.0.50727"/></startup>
The application would still run.
Then, I removed the new line altogether and the application would still run!
Finally, I undid all my changes and started the conversion again. Now, the application would run immediately!
So, if you run into this issue, just try these steps and see if it helps you.
Check discussion here:
http://social.msdn.microsoft.com/forums/en-US/vbgeneral/thread/e60dcbf9-c6a0-47a6-bc37-68d4edc45276
In my case the reason for this error was an invalid app.config. R# renamed the root element from <configuration> to something else (probably because there was another variable that I renamed with the same name).
I found this by following Gopalakrishnan SA'S advice to look in the Event Viewer where I found:
Activation context generation failed for "my.exe".Error in manifest or policy file "my.exe.Config" on line 3. The application config file root element must be configuration.
In my case, I forgot just a simple note,
in the requestedPrivileges you should place one requestedExecutionLevel, NOT MORE
I checked the event viewer to find the error "The application config file root element must be configuration".
It turns out it was the namespace referenced in the app.config.
I had opened it in VS 2015 after it being created in VS 2008
OK, this is my own fault, but I can't seem to rescue myself.
Whenever I try to step into a class that has fields with assignments calling into .NET code, I get a dialog box that contains the text "There is no source code available for the current location.":
For instance, stepping into the constructor of the following class would give me the above message:
public class Test
{
private Stack<String> _Dummy = new Stack<String>();
public Test() { }
}
I assume this is because at some point I fiddled with the settings for the symbol server, but no matter what I fiddle with now, I can't seem to get rid of that message.
Where has my stupidity forgotten what it did?
Summary of my current options:
[ ] Enable address-level debugging
[x] Enable Just My Code (Managed Only)
[ ] Enable .NET framework source stepping
[ ] Enable source server support
Symbol file .pdb locations - empty
Cache symbols from symbol servers to this directory: C:\temp (empty)
See if some source files are accidentally excluded. Do properties of the solution and look at the Debug Source Files section under Common Properties.
In Solution Explorer, check your solution property page under Common Properties, Debug Source Files. If you see the assembly listed under "Do not look for these source files:", delete it and the issue should go away.
Open the solution property page
Check "Do not look for these source files"
If you do not want to debug .NET assembly, a quick fix to avoid "No source available to current location" problem is to uncheck "Require source files to exactly match the original version" check-box under Tool -> Options -> Debugging -> General
Here's what I did to solve this problem. First, stop debugging and just have your solution open in VS. Next, make sure your solution config is set to Debug as opposed to Release. Then simply do a Rebuild (not Build, Rebuild). The next time you fire up the debugger, it should function as normal and you shouldn't get that error message.
Hope this helps!
If you don't want this annoying tab to appear, you can try this add-on that I created:
http://erwinmayer.com/labs/visual-studio-2010-extension-disable-no-source-available-tab/
It is directly downloadable on the Visual Studio Gallery:
http://visualstudiogallery.msdn.microsoft.com/en-us/fdbb2036-471e-40a7-b20e-31f8fd5578fa
Check if your projects have a project reference, not a DLL reference! If there exists a DLL reference, your changes will not be recognized by your referenced project, and you will get an error message like yours.
This error made me go crazy as well. I was using 'AjaxControlToolkit' and had referenced it using 'Add Reference' to my project.
I deleted the 'AjaxControlToolkit' reference and added the same with 'Add Existing Item' and after that I had no problems at all...
I had the same problem in an unmanaged C++ program: when debugger was in main function it always showed "No source code available" and, what was interesting, other functions in this file was shown without problems. In this case, the problem was that I allocated too much data on the stack. After reducing it, the debugger started to work without problems.
It was in Visual Studio 2010.
One way, that also works for Express Editions of Visual Studio (say, Visual Basic 2005 Express Edition), is to rename the .suo file. It is in the same folder as the solution file, .sln. Exit Visual Studio before renaming the file.
The .suo file contains non-critical settings, like window positions, etc. However, it also contains all the breakpoints which is why it is probably better to rename it than delete it in case this action is regretted.
This is how I solved it.
Right click your project -> Properties - > Compile -> Advanced Compile Options...
Then Set 'Generate debug info' to 'Full' from the drop down menu.
Hope that helps.
This worked for me:
Check the "Enable Unmanaged Code Debugging" on the properties page for the referenced *.DLL
Recompile referenced *.DLL
Remove and then re-add the referenced *.DLL to your project
Have you tried to build that page? I had an issue with something similar with AjaxControlToolkit: Modal Popup Extender. It did not show until I gave it CSS and ASP.NET controls.
I had for some reason disabled all the Common Language Runtime Exceptions in VS 2017.
To fix this, open the Exception Settings under Debug > Windows > Exception Settings and mark the checkbox Common Language Runtime Exceptions in the Exception Settings window
I had the same issue, It showed me that the error is on AjaxControlToolkit, but the problem was in my HTML syntax, especially in a div tag, I was putting only the close tag '' without the opening tag
I ran into this problem because of difference between framework versions of test projects and main projects. When upgrading main projects frameworks version, be sure to not forget to upgrade test projects.
I had this problem in VS 2017 C++
TLDR: It was accesing data beyond the limit
The program finished in debug mode and it showed this message: wntdll.pdb not loaded
After fixing it with this answer it started to show the message: There is no source code available for the current location
But also there was a message that popped saying: app.exe has triggered a breakpoint, but the breakpoint was not in my source code, it was in the source code generated by VS in debug mode, Right click in the source code -> Go to Disassembly and the break point was int 3 instruction
At the end it was just a stack overflow, since the code was accesing data beyond the limit, I just fixed the code and the messages were gone
I guess VS didn't show an error about accesing data outside the limit because I was using Winapi function GetEnvironmentStrings() and in the site says: Treat this memory as read-only; do not modify it directly and I was modifying it :)
I had the same problem, and I solved it on this way (Visual Studio 2008):
"Formato de la informacion de depuracion" to "Base de datos de programa (/Zi)"