My team uses VS 2010 Ultimate with TFS and we recently upgraded to Resharper 6. Now every time I close my solution, I get this Resharper error dialog:
No one else here seems to get this but me. Any idea what's going on?
#Mrchief, thanks for your help! I do have permissions to edit the file. Someone else had added it when he installed R# 6 on his pc. His R# options were set to save the cache in the solution folder, as were mine, so here's what I ended up doing:
I opened the solution, checked out the file directly
I closed the solution with the file checked out: no error!
I checked in the file with the solution closed.
With the solution still closed, I set my Resharper options to save my cache in my system TEMP folder
Reopened the solution; now when I close, no error!
It seems that for some reason, you do not have write access to the path. Either it's readonly or is restricted by your administrator.
You can try to save the files in your solution folder instead:
Ok I had same problem where I was moving to different TFS 2010 servers
0) Move the temp file from Solution to temp dir as mentioned above
1) Add the xxxxxx.ReSharper.user to the solution manually
2) remove the readonly attribute from the file xxxxxx.ReSharper.user.
I did step 2 when I went to exit and got the "Error saving" prompt then hit "try again" and all is fine now.
TFS/Source safe leave the file attributes in a mess for Reshaper 6.0
Related
we have recently updated VS/TFS within our team and everytime I open VS now, following warning message appears:
"There appears to be a discrepancy between the solution's source
control information about some project(s) and the information in the
project file(s)"
When I do check-in, I get a change in .sln file for
SccTeamFoundationServer = http://czphaptfs01:8080/tfs
instead of
SccTeamFoundationServer = http://czphaptfs01:8080/tfs/defaultcollection.
I've tried to fix the file manully via Notepad but again, everytime I try to check-in something, the .sln is overwritten back. That leads me to a conclusion there might be possible something wrong set in VS, however when I double check TFS Team Connection in Manager Connection, everything appears fine.
Any help would be greatly appreciated.
Thanks in advance.
I've resolved the issue by reconnecting to the project in Team Explorer.
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 can't solve this problem
I suggest I have to change c:\Windows\System32\drivers\etc\hosts file and add after
# localhost name resolution is handled within DNS itself.
the next line:
127.0.0.1 mysite.dev
but it doesn't help. Any suggestions?
Error ocсurrs when I try to open web site project in Microsoft Visual Studio 2012.
More often than not, at least in my case, this happens is when a *.csproj.user file is in the project directory and has <UseIISExpress>true</UseIISExpress> in it.
Alternatively, as mentioned by Zachary Cutler you can also simply: close Visual Studio, delete the *.csproj.user file and reopen Visual Studio. This will force VS to rebuild the file.
I've already found the solution. I just had to edit C:\Users\Administrator\Documents\IISExpress\config\applicationhost.config file, by adding my site to <sites> node.
You can opt to install IIS locally and edit a couple of tags on .csproj File.
Open you csproj file and go to section <VisualStudio> then find tag <UseIIS>True</UseIIS>
it must be set as true, then go to tag: <IISUrl> and set up with the URL address where the application will be hosted for testing:
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>False</AutoAssignPort>
<DevelopmentServerPort></DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
**<IISUrl>http://localhost/myWebSiteAppSample</IISUrl>**
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
And that is. Now you can load your project normally.
The problem would be your project setup to be executed in the local IIS and the URL specified not exist.
There are options you can do to fix the problem.
Option 1 : (Use IIS Express)
1.) Open you web project .csproj file as XAML or in notepad.
2.) Find these properties and set according to your preferences.
UseIIS = false
UseIISExpress = true
and that's it.
Option 2 : (Use local IIS)
Follow the option 1 steps but change the following properties.
UseIIS = true
IISUrl = https://localhost
UseIISExpress = false
The issue can be fixed by deleting the folder named .vs in the project directory.
This solves the problem because while opening the project after deleting the .vs file, it creates the same folder with subfolder config and folder with project name.
The config folder applicationhost contains the necessary settings required to run the project successfully.
I just went to the directory named in the error and renamed the applicationhost.config and restarted and VS created a new file and ran fine.
Tried several approaches mentioned in the answers, but what finally
worked for me was swapping the <IISUrl> of .csproj with
<CustomServerUrl>.
Edit :
The above didn't solve the root cause of the issue for me. However,
If you've done a windows update recently, perhaps it might be the
reason that's causing the issue. Try executing netsh http add iplisten 0.0.0.0 and see whether it solves the issue.
Hope these would help someone still looking for a way.
I don't know why, by my applicationhost.config file was completely missing from my C:\Users\Administrator\Documents\IISExpress\config\ folder.
Copy/pasting C:\inetpub\history\applicationhost.config into that folder seemed to fix the problem for me.
Got the idea from here.
Turn on windows features "Internet Information Services" in control panel.
Open ".csproj" file and find
Modify this line based on your requirements.
http://localhost:777/
Open the project/solution now
If failed to load again, just right click the solution and select "Reload Project".
I know this is probably a rare occurrence, but figured I'd put it here:
My csproj file was set to "read only" (Don't ask me how I managed that), but after I turned off "read only" access, everything was fine. (VS2017)
Not the exact same error, but I was lead to this answer since the first half of the error matched. Your applicationhost.config file may simply be read-only. Taking that off solved the error for me. That error calls out the file specifically though, so you should be able to find it easily.
I had to somewhat combine some of the above answers. My solution was to edit (not delete) the file .vs\config\applicationhost.config
There is a section for the bindings of the site, simply change from localhost to whatever you desire to run it under. Note that the port numbers are in front of the server name.
I was able to resolve this by editing the file *.csproj in the root level of the project. I changed and from localhost to the site name as shown below. It may also be required to have the OverrideIISAppRootUrl set to True.
I was facing the same issue because of my network password changed.I changed my NetExtendor login password but I have to login in my laptop with old password.
Try these steps to fix this issue:
log into the Computer with whatever password works
log into vpn with whatever password works
ctl-alt-del to lock the pc then use the new password to unlock it
It worked for me :-)
Thanks!
So here are the steps to fix it:
Go where your .csproj file is. This is usually one directory below the solution (.sln)
Right click and open with a text editor (notepad)
Find IISUrl tag and replace its content for http://localhost:(YourPortNumber)
Save and reload your project!
My issue was with Windows 10 Defender. I had given IIS permission in the past, but seems like it is now ignoring it. Will look into it later, but for now I disabled controlled folder access and it worked.
I wanted open an exiting project of Visual Studio 2017 in VS 2019 and encountered with the same issue. I find its a version related problem. The solution is: Create a new project in the newer VS and copy the codes from the older VS.
Try decrypting the applicationhost.config file. That worked for me.
Creation of the virtual directory xxxx failed with error: Object
reference not set to an instance of an instance of an object...
Error Screenshot
This issue happened to me after deleting my local repository and downloading the repository from the cloud.
Per one of the solutions above, I deleted the .vs folder with no luck. To solve the issue, I ended up mixing a couple of the solutions in this forum.
I went to the folder .vs/SolutionName/config and pasted the applicationHost.config file from the latest subfolder on the folder C:/inetpub/history/
After that, I restarted VS and the error disappeared.
simply fix for me
Close your Visual Studio
o remove .vs in .Net
o remove IISExpress in Documents
Reopen it, everything should be fine
I am opening files from a server ASP.net and the VB codebehind files, and my visual studio is not working correctly, Intellisense is dead and if i right click the "Go to defenition" option is disabled. These files are not part of a solution.
This is strange though because it was working properly yesterday. If I create a new project the intellisense works great, yet opening this single file it fails.
I have tried to re enable intellisense by resetting visual studio, I tried editing the text editor settings so that Auto list members and Parameter information are both checked. I even tried installing ReSharper and nothing worked. I have rebooted twice and even tried copying the file to a local drive to work on yet nothing.
Does anyone know why this is happening and what I could do to solve the problem? Im working on a rather complex problem and intellisense would make it a lot easier.
I managed to fix this problem which manifested itself after my ReSharper trial expired.
Steps to fix are:
Tools/Import and Export Settings
Reset all settings
Back up your config
Select your environment settings and finish
Intellisense started working again straight away.
For me simply hitting Ctrl+Alt+Space to re-enable Autocompletion fixed it.
I had the same problem. It only affected one of my solutions. Others seemed fine.
To correct it I deleted the solution's user options file (.suo).
When I opened the solution again, intellisense was working.
For the benefit of searchers, Nicks suggestion is good, but if you don't want to reset all your settings, you could follow the recommendation in this post.
It states - "go to "Tools | Options | Text Editor | C# | General and check the "Auto list members" and "Parameter information" checkboxes"
I should first note that upgrading my RAM from 4 to 16GB seems to have made this issue go away.
Here's the steps I go through:
If only one file/window appears to be affected, close/reopen that file. If that doesn't work, try below.
In Visual Studio:
Click Tools->Options->Text Editor->All Languages->General
Uncheck "Auto list members"
Uncheck "Parameter information"
Check "Auto list members" (yes, the one you just unchecked)
Check "Parameter information" (again, the one you just unchecked)
Click OK
If this doesn't work, here's a few more steps to try:
Close all VS documents and reopen
If still not working, close/reopen solution
If still not working, restart VS.
For C++ projects:
MSDN has a few things to try: MSDN suggestions
The corrupt .ncb file seems a likely culprit.
From MSDN:
Close the solution.
Delete the .ncb file.
Reopen the solution. (This creates a new .ncb file.)
Sometimes, it could be because of different extension style that you are using for the files.
In my case Intellisense is working in all the files except for a file in a different project of the same solution.
When I have changed the extension of the file to cxx from cpp,it started working.
The includes and other files in the solution are of extension .cxx or .txx.
Thank you
Save your solution. Closing the VS2010 instance for this solution and re-oprning worked for me.
Here I assume that Intellisense was working OK but stopped for some unknown reason without changing any default settings.
Prabhdeep
After uninstalling ReSharper, the squigglies that show up underneath a syntax error stopped showing up in the code editor.
This blog post helped me fix the issue.
Try this:
Close any open instances of visual studio, delete the folder 10.0 inside `C:\Users[username]\AppData\Roaming\Microsoft\VisualStudio\' and restart the visual studio. Issue will be fixed.
In my case, none of the above worked (although I discovered that sometimes the *.suo file is the trouble maker - in those cases deleting it helps).
I fixed it successfully the following way: Let's assume your solution has the name MySolution. Do the following:
Reset the settings (as described here). Close Visual Studio 2012.
Locate the file MySolution.sln.DotSettings (it is in the same folder as your MySolution.sln file)
Rename or delete it (for example rename it to XMySolution.sln.DotSettingsX so VS won't read it)
Open your solution by double-clicking on the MySolution.sln file
And afterwards Intellisense was working again just fine. I assume the file MySolution.sln.DotSettings got corrupted.
Note: The file MySolution.sln.DotSettings was created and checked in to TFS by a team colleague who had installed ReSharper. The issue occurred on a different PC without ReSharper where the same project was opened.
For me, this was related to an incorrect xaml file build action in an Azure WorkerRole project (bizarre, though it may seem!). Please see my entry in this post if you want to know more:
C# VS2010 Entering break mode failed
The fix for the error in the above thread also resulted in the intellisense starting to work again.
I fixed this problem by removing Sybase Power Designer VS extension.
You can try to disable other extensions.
Exactly the same issue, though would appear only on certain projects (even within a single solution).
Removing the *.*proj.user file (e.g. *.csproj.user) for the projects in question properly reset the missing features ("Go To Definition", "Organize Usings", Intellisense on certain types, etc).
In our case, I suspect this happens sometimes when we switch branches with an SCM that uses a single working directory (like git). If setup properly, it wouldn't track *.user* files but that means that if there are incompatible changes in it across different branches, you need to regenerate it.
So of course the "sometimes" would depend on the current branch and the next branch.
Unfortunately I don't see a very good solution if that's the case. Sometimes you really want to keep the user settings across branches if they're compatible, sometimes you want to regenerate them unconditionally. Ideally, you might even want to only change parts of them when switching, while keeping other parts.
If you never need to keep them and are fine with regenerating them every time, then you can configure your SCM to always remove these files while switching branches (e.g. using hooks for git). This is a pretty naive solution however, doing it more universally correctly would require a smarter system (aware of the semantics behind the .user files and capable of capturing/prompting user intent when needed).
save, close and reopen the source file you are working on. This works every time for me.
Try to add the statement:
<%# Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="IP_Updater.Default" %>
...at beginning of your page. The above example is applied for page Default.aspx written in VB.NET.
This is the problem related to Microsoft MSDN , your MSDN might be getting some problem. The solutions to this is uninstall MSDN and then re-install . before going for this make sure that you system is free from virus attack.
Hope that after doing , the Microsoft Intellisense will start running
I am using VS 2010 and recently I moved some files around and changed paths etc.
The solution still compiles correctly and all files are able to be loaded/compiled without error however just about every time I go to compile after a change it gives me the save as dialog and asks me to save one of the projects, if I try to give it a new name or something the dialog does not exist nothing I do can make it exit apart from pressing cancel.
If I do a build straight after cancelling it works fine and I'm not presented with the save as dialog. I have verified that the project file is not read only.
Any ideas as to whats going on here.
The solution is stored in TFS 2008
You need to do 2 things
1- remove the read-only tick from the project folder
2- when a save-as window prompts at build, just overwrite the project
next time you build, the window won't pop up
You need to run VS as administrator. (right click on VS Icon- Run as administrator)
I solved the issue. When I try to save as this time it gives the error that file is being used by another process. Google Sync prevents to save so it opens save as dialog.
You should put your project under a folder not sync while working.
Are the bindings in TFS set up correctly with the new location? TFS will mark files as read only unless they get checked in. It might have been marked as such before you moved everything around, and now, isn't being checked out properly.
Also, try closing sync. files tools like google backup and sync.