EDIT :
After finishing this post I ran into all sorts of other strange issues and restarted using a Web Appliction instead of a plain old Website. Between IntelliSense not showing any classes, to project reference issues, I couldn’t figured it out in time. I’m sure there’s a way, I just had to move on. So maybe this ramble below will be helpful for someone.
EF
Just ran into something quirky with Visual Studio 2008’s new ADO.NET Entity Data Model wizard. While working on an ASP.NET 3.5 website ( not a codebehind web application ) I was trying to get the ADO.NET Entity Data model wizard to work with MySQL and ran into a probable Visual Studio bug. To sum up the issue, if you are going to add a new edmx to your project, do NOT save it to the App_Code folder initially. Put it in your root folder, compile your project, then move the edmx where you’d like.
Assuming you’ve already created your ASP.NET Website project, here’s how you reproduce this issue.
Right click your project and left click ‘Add New Item’

Add New Item
Select ADO.NET Entity Data Model, name it, select your language of preference

ADO.NET Entity Data Model
Click Yes to the ‘Store in App_Code’ prompt

Place file in 'App_Code' folder
Complete the new Entity Data Model wizard
See this tutorial if you have not done this before
Compile project after completing wizard

Invalid token 'void' in class, struct, or interface member declaration
At this point your project should have a new.edmx file located inside of the App_Code folder, but the project won’t build without failing. If you are stuck in this predicament, follow this workaround.
Move .edmx to root folder and rebuild

WORKAROUND : move edmx to root folder, then recompile
After moving your edmx file to the root folder you should be able to compile without problem. Assuming this solves your problem, you should be able to move your edmx file to the App_Code folder without problem. Seems like an initial compile problem.
Tags: ADO.NET, ADO.NET Entity Data Model, edmx, error, mysql, Visual Studio, visual studio 2008, void
Posted in .net, C#, Visual Studio, development, hack, microsoft, mysql, tips and tricks, windows | 2 Comments »
Have you ever had Visual Studio tell you your web application publish failed, but never gives you a reason why? You’re not alone. I’ve been putting off looking into this issue on a project and just found a way to get my answer right away.

Visual Studio 2008's Publish Failed message
Here’s what you should do inside of Visual Studio to find out why your publish failed.
- Click the Tools menu > then Options to bring up the Options dialog.
- Expand ‘Projects and Solutions’ on the left and click General
- On General, click ‘Show Output window when build starts’
- Now click on ‘Build and Run’ in the left tree
- Next select a value from the ‘MSBuild project build output verbosity’ drop down menu
- OK your way back to the main Visual Studio window
- The next time you Build or Publish your project, you should see the Output panel pop up. If your publish is still failing, the answer will live inside the Output panel
Here’s a visual walkthrough of these instructions.

Tools > Options > Projects and Solutions > General

Tools > Options > Projects and Solutions > Build and Run

Visual Studio's Output Panel
Tags: .net, build options, msbuild, output panel, publish, publish failed, publish options, verbosity, Visual Studio, visual studio 2008
Posted in .net, C#, Visual Studio, development, microsoft, random, tips and tricks | 5 Comments »
I recently ported a .net1 project to .net2. I have to give props to Microsoft for making Visual Studio 08 so helpful in the migration process.
There is a conversion wizard that updates the .net guts of the project itself. Then the next time you build your project, Visual Studio lets you know what code needs to be updated. It doesn’t do everything for you, but I’m not aware of any IDEs that are this helpful when it comes to porting legacy code.
While the porting process wasn’t too bad, getting IIS and ASP.NET setup and running was sort of a fubar.
- IIS didn’t like that I have Apache running
- After turning off Apache, IIS complained about a metabase problem
- Tried fixing with the MetaAcl Tool
- Googled around and found my fix “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -i”
- Next I couldn’t debug because my project was built as a Release
- Changed to debug then had to clear out my .net framework temp folder
- Rinse and repeat windows voodoo, now I’m debugging
The jury is still out on how much I miss asp.net. It sure beats the hell out of PHP. But then again, I’ve got my PHP chops back and I’m really enjoying the simplicity and speed which I can crank smallish things out.
Tags: .net1, .net2, apache, iis, visual studio 2008
Posted in .net, microsoft | No Comments »