Visual Studio 2005: Anyone Else Having Problems?

Posts   
 
    
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 04-Apr-2006 15:42:53   

All,

I'm doing my first client project with VS2005. It's and ASP.Net project. We have had nothing but problems.

A few specifics:

  1. We have a master page, on which we have a control. You have to jump through a few hoops to be able to "see" the control from within a content (aspx) page. In addition, because you can't use controls as types anymore (and what's with that, btw?), you have to register the control on each of the content pages. This is bad enough.

However, even when this is all done properly, we have a wierd problem with the code compiling. It will compile for two days straight, and then all of a sudden, it won't compile!!! The same code should either compile or not compile. Am I crazy or should that just be a given?

  1. We are using VSS for source control. Somehow, deleted/excluded files keep reappering in our project. I'll delete a file from my hard drive and from VSS, and somehow the next time I load the project, the file is back. It might have something to do with someone else working on the project--I'm not sure. But since the new ASP.Net no longer uses a project file, it seems that it no longer tracks the files that are in the project? It just adds any files that it finds in the directory tree?

Is anyone else having these types of problems?

alexdresko
User
Posts: 336
Joined: 08-Jun-2004
# Posted on: 04-Apr-2006 16:16:33   

A couple of questions..

  1. What do you mean by "seeing" the control on the ASPX page? The only hoop you have to jump through is setting the MasterType directive in your ASPX page.

  2. What do you mean by "you can't use controls as types"?

  3. What errors are you getting when the project won't compile?

  4. Try "Check in pending changes" in the Source Control Explorer window, then refresh the window to see if your deleted are finally gone from the project.

We're using TFS for source control so I don't know how different it is from VSS. I don't have a problem with VS2005 keeping track of which files are in source control though. I can add or delete files without any problems unless I delete a file and then recreate a file with the same name. In that case, I usually pound my fist on my desk and create the new file with a different name because I haven't taken the time to figure out the proper procedure. simple_smile

pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 04-Apr-2006 17:44:13   

psandler wrote:

  1. We have a master page, on which we have a control. You have to jump through a few hoops to be able to "see" the control from within a content (aspx) page. In addition, because you can't use controls as types anymore (and what's with that, btw?), you have to register the control on each of the content pages. This is bad enough.

That is by design. You need to expose the control as an internal or public if you wish property in the master page. You don't have to "register" the control with the content page, but it saves you a cast if you do.

I haven't seen the compile problem.

psandler wrote:

But since the new ASP.Net no longer uses a project file, it seems that it no longer tracks the files that are in the project? It just adds any files that it finds in the directory tree?

The ASP.Net team just released an new Web Application project type that is more like the VS 2003 web project. If you don't like the file system Web Site you can move to this. But, something sounds wrong with your source control, or someone is using it wrong.

Are you sure when you delete the file, it is deleted from source control. In PVCS we have to delete the file from source control specifically. Just deleting the work file doesn't do anything.

BOb

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39798
Joined: 17-Aug-2003
# Posted on: 04-Apr-2006 18:17:23   

All I have problems with is the severe slowness of the editor sometimes. My interfaces.cs file contains a lot of interfaces though typing an xml comment there is so slow, the editor displays what I type 2-3 seconds after I hit the key!. Turning off the navigation bar makes the slowness go away. Silly, as in vs.net 2003, the same file doesn't slow things down.

Oh, and of course the weird aspect of the fact that if you have your unittest projects in instance A, and you re-compile the libs used by these projects and do that recompilation in instance B, and you have added members to the interfaces in B, no matter what you do, A has to be shutdown and reloaded before you'll see the new members. VS.net 2003 doesn't have this.

Frans Bouma | Lead developer LLBLGen Pro
alexdresko
User
Posts: 336
Joined: 08-Jun-2004
# Posted on: 04-Apr-2006 18:18:46   

I've been thinking about converting my existing Web Site Project to use the new Web Application Project type, but am hesitant due to the known issues that still exist in the current release. They're making pretty good progress on that thing though so I don't expect it to take very long before they release another refresh.

Posts: 497
Joined: 08-Apr-2004
# Posted on: 04-Apr-2006 21:36:14   

Its a bit evil of me, but I'm glad to see other people having problems with VS2005 apart from me simple_smile I'm having performance issues myself just like Frans mentioned - sometimes it takes an age for the editor to update when I'm editing - even in a .txt file !! Theres def. some gremlins in there thats for sure.

We're using the web application project you mentioned alex - its pretty good, I was much happier to go back to it after my limited experience with vs2005 web sites. As far as I know though there isn't a further planned "refresh", since they're wrapping it all up for the VS2005 service pack (which I reallly hope is soon).

Matt.

pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 04-Apr-2006 23:38:16   

Otis wrote:

All I have problems with is the severe slowness of the editor sometimes. My interfaces.cs file contains a lot of interfaces though typing an xml comment there is so slow, the editor displays what I type 2-3 seconds after I hit the key!. Turning off the navigation bar makes the slowness go away. Silly, as in vs.net 2003, the same file doesn't slow things down.

Are you using any add-ins? I have heard the the current ReSharper betas can cause editor slowdowns.

BOb

psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 05-Apr-2006 00:00:40   

Thanks for your responses.

I should be clear that all of the conclusions I've drawn are based on the info that I could scrape together off of Usenet and random forums. Some of it may have applied to the beta, or some of it may be just plain wrong. simple_smile

alexdresko wrote:

  1. What do you mean by "seeing" the control on the ASPX page? The only hoop you have to jump through is setting the MasterType directive in your ASPX page.

Yep, I did this. For some reason I could then see the Master.control but would still get compiler errors when I tried to use the control's properties on the content page UNLESS I put a @register directive for the control on the content (aspx) page as well.

alexdresko wrote:

  1. What do you mean by "you can't use controls as types"?

(I should have said "User Control")

Essentially, I mean you can't declare a user control from the code behind directly, unless it is registered on the aspx page. So for every control you want to use in the code behind, you have to @register it on the aspx page.

If I am wrong about this PLEASE straighten me out. Even as a write this it doesn't make sense to me, but I have found numerous posts complaining about this issue (possibly from the beta?).

All I want to do is be able to do:


Protected myControl  As WebControls_wcErrorHelper
'pardon the VB and the crappy naming convention--neither was my decision.  :)

It doesn't work without the @register directive. Again, I hope I'm missing something obvious.

pilotboba wrote:

The ASP.Net team just released an new Web Application project type that is more like the VS 2003 web project. If you don't like the file system Web Site you can move to this. But, something sounds wrong with your source control, or someone is using it wrong.

Thanks for the info--I will absolutely be moving to this when it is stable. Yes, I think it is possible that someone is using VSS wrong. My current theory is that someone still has the files on their hard drive, and they keep getting added back in (and re-added to VSS) when they check in every night.

pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 05-Apr-2006 00:49:24   

psandler wrote:

My current theory is that someone still has the files on their hard drive, and they keep getting added back in (and re-added to VSS) when they check in every night.

Does VSS have logs of the check-ins and such. You should be able to see when the initial check in was and who checked it in. I know PVCS Version manager tells me all this. I would be able to see right away who kept adding these previously deleted files.

BOb

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39798
Joined: 17-Aug-2003
# Posted on: 05-Apr-2006 09:31:14   

pilotboba wrote:

Otis wrote:

All I have problems with is the severe slowness of the editor sometimes. My interfaces.cs file contains a lot of interfaces though typing an xml comment there is so slow, the editor displays what I type 2-3 seconds after I hit the key!. Turning off the navigation bar makes the slowness go away. Silly, as in vs.net 2003, the same file doesn't slow things down.

Are you using any add-ins? I have heard the the current ReSharper betas can cause editor slowdowns.

No I don't use any add-ins, which indeed make it slower. The slow down is known by ms btw, though I doubt it if it will be solved before orcas.

Frans Bouma | Lead developer LLBLGen Pro
alexdresko
User
Posts: 336
Joined: 08-Jun-2004
# Posted on: 05-Apr-2006 14:55:45   

psandler wrote:

Essentially, I mean you can't declare a user control from the code behind directly, unless it is registered on the aspx page. So for every control you want to use in the code behind, you have to @register it on the aspx page.

Are you aware you can load a UserControl dynamically from code behind? In other words, you don't have to Register the control in your ASPX page.

psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 05-Apr-2006 15:59:48   

alexdresko wrote:

Are you aware you can load a UserControl dynamically from code behind? In other words, you don't have to Register the control in your ASPX page.

As far as I can figure out, you can't do this anymore. Again, please correct me if I'm wrong.

I just tried the following: 1. Create a new web project. 2. Create a new user control called philtest1.ascx 3. Open the code behind for Default.aspx 4. Type in the code:

Private _test as new phil . . .

There is no phil* in the intellisense.

Now if I put the following in my aspx page:

<%@ Register TagName="hi" TagPrefix="test" Src="~/philtest1.ascx"  %>

the type is available in intellisense.

Am I missing something?

alexdresko
User
Posts: 336
Joined: 08-Jun-2004
# Posted on: 05-Apr-2006 17:18:22   

psandler wrote:

Am I missing something?

No, you're right. I forgot about that...

psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 05-Apr-2006 17:23:00   

alexdresko wrote:

psandler wrote:

Am I missing something?

No, you're right. I forgot about that...

cry

I was hoping you had a magic fix for this. simple_smile

I have seen some articles on workarounds using stubs stored in App_Code, or inline code on the ascx page (blech). I haven't tried any of them yet.

pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 06-Apr-2006 17:41:04   

psandler wrote:

Essentially, I mean you can't declare a user control from the code behind directly, unless it is registered on the aspx page. So for every control you want to use in the code behind, you have to @register it on the aspx page.

This is probably due to the compile semantics of the new web site project type. However, I think in ASP.Net 2.0 you can register controls in the web.config, there is a new controls section.

This URL talks about it, unfortuantly the graphic isn't there so I can see exactlly were to put it. If you figure it out let us know.

http://scottwater.com/blog/archive/2004/08/29/13121.aspx

Also, you might want to look at this article:

http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx

BOb

mattsmith321 avatar
Posts: 146
Joined: 04-Oct-2004
# Posted on: 06-Apr-2006 19:20:18   

alexdresko wrote:

I've been thinking about converting my existing Web Site Project to use the new Web Application Project type, but am hesitant due to the known issues that still exist in the current release. They're making pretty good progress on that thing though so I don't expect it to take very long before they release another refresh.

I didn't see it explicitly mentioned in this thread, but Scott had a post on 4/5 about the Release Candidate version: VS 2005 Web Application Project Release Candidate Now Available - http://weblogs.asp.net/scottgu/archive/2006/04/05/442032.aspx

That appears to address a number of the outstanding issues.

alexdresko
User
Posts: 336
Joined: 08-Jun-2004
# Posted on: 13-Apr-2006 04:16:31   

psandler wrote:

cry

I was hoping you had a magic fix for this. simple_smile

I have seen some articles on workarounds using stubs stored in App_Code, or inline code on the ascx page (blech). I haven't tried any of them yet.

http://www.kbalertz.com/Feedback_915782.aspx

Magic fix? The scenario we're talking about here is mentioned in the symptoms and supposedly there's a hotfix.

I'll try to remember to give it a try the next time I have to dynamically load a usercontrol...