"Cannot Resolve Symbol" error for typed datasets in XSD in app_code folder

Using Vs 2008, .NET Framework 3.5 Resharper 4.1 downloaded today on a Web Site project.

I get "Cannot Resolve Symbol" error for all typed datasets in XSD in app_code folder.

The project compiles and runs just fine.

This makes Resharper useless for analysis - which were the main reason I invested in Resharper to begin with.

Is this a configuration error or a bug or what?

I have really enjoyed working with Resharper 3.x in VS 2005 on other projects. I'd hate to have to live without it now that we have migrated to VS 2008 and framework 3.5.


Thanks for any input!

Edited by: Daniel on Oct 17, 2008 6:18 PM

0
21 comments
Avatar
Permanently deleted user

Daniel,

Could you send us you sample project for investigation?

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Avatar
Permanently deleted user

It is very simple to reproduce:

1. start a new Web Site Project in VS 9
2. Add an ASP.NET folder: App_Code
3. In this folder add a dataset
4. Add a TableAdapter to this dataset
5. Instantiate and use this dataset in Default.aspx.cs

It will compile fine. Using built in VS color coding everything looks OK.

If Resharper is used all references to DataSet1 will be red and marked 'Cannot Resolve Symbol'. it will still compile and run fine. But it makes Resharper useless for analyzing and color coding code.

I have attached a very simple sample application using Northwind.mdb, that only list the number of categories in the Categories table.

I've really liked Resharper before but this bug makes it useless and I find myself using Ctrl+8 to turn off Resharper analysis on every cs page. :(



Attachment(s):
ResharperResolveSymbolTest.rar
0
Avatar
Permanently deleted user

Daniel,

What build are you using? I cannot reproduce the problem with the most
recent build - your solution is absolutely green.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Avatar
Permanently deleted user

Unfortunately I get the same behavior also with the latest nightly from October 21st.

I have attached a screenshot, that illustrates it.

I am using VS 9.0.21022.8 and Team Foundation Server.

This is currently forcing me to disable Resharper our current major project.

I would really appreciate any help!!!



Attachment(s):
Resharper.gif
0
Avatar
Permanently deleted user

Daniel schrieb:

This is currently forcing me to disable Resharper our current major project.

I would really appreciate any help!!!


Try to delete the R# Chaches.

Menu=>ReSharper=>Options=>General=>System=>Clear Caches

and restart Visual Studio.

Regards

Albert

0
Avatar
Permanently deleted user

I have investigated this further.

With the same simple project, except created as a Web Application, not a Web Site, Resharper works fine. See screenshot_1. The only difference being the project type and the fact that for Web Applications the DataSet1.xsd is placed in the root and not in a App_Code folder.

Just to be sure I then again created a new project as a Web Site, with the DataSet1.xsd placed in the App_Code folder. The Resharper problem is there again See screenshot_2. All references to DataSet1 are red and marked as 'Cannot Resolve Symbol'. It compiles and runs just fine. Turning off Resharper analysis with Ctrl+8 everything looks fine. See screenshot_3.

I have attached both these projects.

Again, I'd be extremely grateful for any help that would render Resharper useful again!



Attachment(s):
screenshot_3_WebSiteWithOutResharper.gif
screenshot_2_WebSiteWithResharper.gif
screenshot_1_WebApplication.gif
WebSite1.rar
WebApplication1.rar
0
Avatar
Permanently deleted user

Thanks for taking the time to try to help!

Unfortunately clearing the cache does not help. I tried that now that I saw your post.

I have also tried creating a completely new project after I installed the latest nightly, for that project there should be no conflicting cache.

/Daniel

0
Avatar
Permanently deleted user

?

0
Avatar
Permanently deleted user

You do not have any other suggestion? Could you please also test with the solutions in my last post? I am desperate, and Resharper is soon going out of the window,

0
Avatar
Permanently deleted user

Daniel,

Could you start VS with resharper logging enabled (devenv.exe
/ReSharper.LogFile "c:\ReSharperLog.txt"), open website, type a space
somewhere in web.config, save it and wait until ReSharper finishes its
activity. And then send us the log file.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Avatar
Permanently deleted user

Daniel,

Could you start VS with resharper logging enabled (devenv.exe
/ReSharper.LogFile "c:\ReSharperLog.txt"), open website, type a space
somewhere in web.config, save it and wait until ReSharper finishes its
activity. And then send us the log file.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Avatar
Permanently deleted user

I still have this problem with the latest release. Have you made any progress on a solution? Would very much appreciate an update even if it is to say that you have no new information to provide.

Thank you,

Curt

0
Avatar
Permanently deleted user

Curt,

I've just discovered a problem with xsds and app_code. It would be great if
you're able to send me a sample solution to make sure your problem coincides
with what I gonna fix ASAP. Thanks in advance.
My direct e-mail is qx at jetbrains.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Avatar
Permanently deleted user

Sergey,

Thanks for letting us know there is a problem.  Could you give us the issue # so we can track it ourselves, or has this been fixed and there's a downloadable patch?  Or anything about the status of this problem?

Thanks,
Richard

0
Avatar
Permanently deleted user

Hello,
I have got same problem.
Do you have any solution?
I use Resharper 4.5 and Visual Studio 2008 Developer Edition.

0
Avatar
Permanently deleted user

Hello Victor
     Could you please send a small repro solution to andrew dot serebryansky at jetbrains dot com? Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Avatar
Permanently deleted user

Hello Andrew

I sent you project by mail.

Best regards,
Victor Kachesov

0
Avatar
Permanently deleted user

Hello Victor
     We've just fixed this problem. Please try the next nightly build of ReSharper 5.0 from http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+5.0+Nightly+Builds. Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0

  I'm new to ReSharper, and I've run into the same error even when using the 5.0 beta and nightly build you recommend. It took me two hours, but I was able to nail down the issue to a single line of markup in the web.config file. I'm using VS2005 Pro SP2.

  I've attached a project having only 4 files that duplicates my findings.

  I use the profile feature of .Net 2.0, and when the type points to a class file, and I compile, then ReSharper can not resolve the "using ...TableAdapters" statement to my .xsd file in the App_Code folder. If I comment out that one line in the web.config and compile, then ReSharper does resolve the using statement.

  I tried a second profile object of type Int32, and this has no affect on resolving the using statement. With the first profile statement commented out and this second profile statement included, ReSharper does resolve the using statement.

  In both scenarios, the project compiles without errors. In my original project (many many files), it also compiles and runs even when ReSharper can not resolve the using statement.

  Hopefully, I've provided enough info to allow someone to find the bug and squash it! :-)  It would dfinitely help me out.

Cheers,

Chris Vance



Attachment(s):
ReSharper_Resolve_Bug_4.5_and_5_beta.zip
0

Chris,

I'm sorry, but it's a known issue: sometimes we fail to pick up the things that reside in App_Code folder. I hope we'll cope with the problem in next major release, but not in 5.0.

0

Hi Sergey,

  Hmm, that's too bad. That really limits the usefulness of ReSharper. It's not picking up either of my .xsd files so every page in my web app has "errors." Very frustrating. Now I'm not sure what I can or can't trust.

  Also, it slows down my dev environment significantly. Each page takes about 10 seconds just to load. This may be connected to the number of "errors" ReSharper thinks is in my site. I need to find the off switch and only turn ReSharper on for specific tasks. Not what I was hoping for at all. Thanks for getting back to me on this.

Chris

0

Please sign in to leave a comment.