0

I have a solution with several projects in Visual 2008, let's say SuggestionProcessor (a class library) and Suggestions (a website) with a webhandler GetSuggestions.ashx. I changed a method in SuggestionProcessor which is used in the webhandler. The call in the webhandler has been adjusted to the changed method.

But now when I try to execute the webhandler after a rebuild I get an error that the method I changed is missing, displaying the old method signature. When I try to rebuild the entire project it seems that the website does not rebuild properly and the code I changed in the webhandler does not seem to be included in the rebuild. I made sure that the website is last in the build order.

What I tried is remove the dlls that the build process should rebuild from the bin folder (not the ones referenced from outside the website). When rebuilding I now get a: 'could not load type Suggestions.global'. Duh, that is what the build process should create. What is going wrong here?

Michiel Borkent
  • 34,228
  • 15
  • 86
  • 149

7 Answers7

1

I solved this one by reverting to a previous state when it still worked.

Thanks for the suggestions, I'm sorry they didn't work in my situation.

Shall I delete this question now that it doesn't really have a clear use for someone else?

Michiel Borkent
  • 34,228
  • 15
  • 86
  • 149
0

From my answer at "Could not load type [Namespace].Global" causing me grief:

It seems that VS 2008 does not always add the .asax(.cs) files correctly by default.

In this case, refreshing, rebuilding, removing and re-adding, etc. etc. will not fix the problem. Instead:

Check the Build Action of Global.asax.cs. It should be set to Compile.

In Solution Explorer, Right-click Global.asax.cs and go to Properties. In the Properties pane, set the Build Action (while not debugging).

Community
  • 1
  • 1
jyoungdev
  • 2,674
  • 4
  • 26
  • 36
0

I would check your web.config file, there may be references there that are causing the error since they are missing.

cjheath
  • 55
  • 10
0

Maybe try and right click on your solution and select "Clean solution" and then try and rebuild all.

If that doesn't work, check your solutions build configuration and make sure all your projects are getting built

lomaxx
  • 113,627
  • 57
  • 144
  • 179
0

Try "Clean Solution", then building SuggestionProcessor, and after that clean and rebuild the web solution.

Oded
  • 489,969
  • 99
  • 883
  • 1,009
  • When I uncheck Suggestions (the website) in the configuration manager, the solution builds fine. When I turn it back on, I keep getting: could not load type Suggestions.global. – Michiel Borkent Sep 17 '08 at 11:04
0

Visual Studio creates a copy of all your DLLs and sometimes this copies are not refreshed. Just execute iisreset and delete all folders in:

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\

Of course change windows installation folder and framework folder to your version!

Drejc
  • 14,196
  • 16
  • 71
  • 106
0

I don't think so... I've seen similar issues in Visual Studio 2008 working on web projects where the build and rebuild would fail time after time. I knew that my changes shouldn't have affected the build so I just kept cleaning and building each of the individual projects in my solution until finally (and I do mean finally as in, it took up to 10 builds) my web project would build correctly. I have no idea why, but it feels like some sort of caching issue.

kooshmoose
  • 442
  • 3
  • 10