[RESOLVED] Issues with moving a project to Visual Studio 2010-VBForums
Page 1 of 2 12 LastLast
Results 1 to 40 of 45

Thread: [RESOLVED] Issues with moving a project to Visual Studio 2010

  1. #1

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Resolved [RESOLVED] Issues with moving a project to Visual Studio 2010

    Hi,
    I was forced to upgrade my ASP.Net project from Visual Web Developer Express 2010 (VWDE 20101) to Visual Studio 2010 (VS 2010) due to the slightly inconvenient fact that the former does not support 64 bit applications. So I created a new project in VS2010 and included all of the web pages and forms. That was the easy part. Of course I ended up with a gazillion errors and twice as many warnings. I fixed many and all but about 20 remain (see below)

    One of these errors: "Protected Sub Page_Load(sender As Object, e As System.EventArgs)' has multiple definitions with identical signatures." is easily enough eliminated by renaming the function/sub name. For some reason in VWDE 20101 I was able to copy similar functions/subs from one form to another and make the minor changes required for that particular form without changing its name. My first question: does VS 2010 not allow duplicate function names in the entire project. This seems so retarded, especial since many of my forms come with subs like Page_Load and Submit_Click (well you get the idea.) Of course it is entirely possible that I am failing to see something here, and that it is some other issue entirely.

    Also, I had a library (App_Code folder) in my VWDE 2010 project that contained public C# functions. In and of itself this is not so remarkable other than the rest project is written in VB. The problem here is that VS 2010 and Intellisense) cannot find the classes in the App_Code folder and I have no idea how to get it to see the functions and subs contained within. The suggestion to "rewrite" this code in VB, although valid, won't help since the original functions were written by someone else and are way beyond my understanding. I mean I don't even understand what they do, I just know where they have been plugged in (dangerous I know, but it used to work). This, of course is a problem when you try to use an on-line translator. After the code has been translated, or at least that part which it understood, you still have to figure out the rest. It didn't work, I tried. Is there a way to tell VS 2010 where these missing classes are located? (Error 3)

    And finally as you peruse the list below and recognize any errors that you know how to fix, please let me know since it will probably save me a ton of time. Thanks for your help, and have a Merry Christmas everyone. It is good to have friends in the land of code.

    Warning 1 Errors occurred while compiling the Xml schemas in the project. Because of this, Xml intellisense is not available.
    Error 2 Class 'System.Web.UI.Control' cannot be indexed because it has no default property.
    Error 3 'sqlValuesParten' is not declared. It may be inaccessible due to its protection level.
    Error 4 'Head1' is already declared as 'Protected WithEvents Head1 As System.Web.UI.HtmlControls.HtmlHead' in this class.
    Error 5 'form1' is already declared as 'Protected WithEvents form1 As
    System.Web.UI.HtmlControls.HtmlForm' in this class.
    Error 6 'FormViewHydDetails' is already declared as 'Protected WithEvents FormViewHydDetails As System.Web.UI.WebControls.FormView' in this class.
    Error 7 'SqlODS_HydrantData' is already declared as 'Protected WithEvents SqlODS_HydrantData As System.Web.UI.WebControls.ObjectDataSource' in this class.
    Error 8 'Protected Sub Page_Load(sender As Object, e As System.EventArgs)' has multiple definitions with identical signatures.
    Error 9 'FindControlRecursive' is not declared. It may be inaccessible due
    to its protection level.
    Error 10 'Head1' is already declared as 'Protected WithEvents Head1 As System.Web.UI.HtmlControls.HtmlHead' in this class.
    Error 11 'form1' is already declared as 'Protected WithEvents form1 As System.Web.UI.HtmlControls.HtmlForm' in this class.
    Error 12 'RowIcon' is already declared as 'Protected WithEvents RowIcon As System.Web.UI.HtmlControls.HtmlImage' in this class.
    Error 13 'lblInsertMsgLabel1' is already declared as 'Protected WithEvents lblInsertMsgLabel1 As System.Web.UI.WebControls.Label' in this class.
    Error 14 'lblInsertMsgLabel2' is already declared as 'Protected WithEvents lblInsertMsgLabel2 As System.Web.UI.WebControls.Label' in this class.
    Error 15 'DateInspected' is already declared as 'Protected WithEvents DateInspected As System.Web.UI.WebControls.TextBox' in this class.
    Error 16 'DDlstInspBy' is already declared as 'Protected WithEvents DDlstInspBy As System.Web.UI.WebControls.DropDownList' in this class.
    Error 17 'InspComments' is already declared as 'Protected WithEvents InspComments As System.Web.UI.WebControls.TextBox' in this class.
    Error 18 'btnSubmit' is already declared as 'Protected WithEvents btnSubmit As System.Web.UI.WebControls.Button' in this class.
    Error 19 'RequiredFieldValidator_DDlstInspBy' is already declared as 'Protected WithEvents RequiredFieldValidator_DDlstInspBy As System.Web.UI.WebControls.RequiredFieldValidator' in this class.
    Error 20 'RegularExpressionValidator1' is already declared as 'Protected WithEvents RegularExpressionValidator1 As System.Web.UI.WebControls.RegularExpressionValidator' in this class.

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  2. #2
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Hello,

    Okay, I haven't read through all the errors etc, because I wanted to cut to the chase and ask something...

    Why not simply open the project in Visual Studio 2010? If the Express Edition can open it, so can the full version. Once in there, you can use Visual Studio itself to make any alterations to the project.

    Gary

  3. #3

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    A valid question. The original project resides on our client's server and I have been working on it via remote desktop-ing. They have VWDE 2010. To access a lisenced copy of VS2010 I (thought that I) had to recreate the project on our servers.

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  4. #4
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Nope, you shouldn't "have" to.

    If you can get the source files on your machine, simply open the project in your Visual Studio, and work from there.

    Gary

  5. #5

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    But, if I copy/move the source files to a different file location, and I am assuming you are primarily talking about the project file (.sln), won't I distroy the file references?

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  6. #6
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Hello,

    Well, that sort of depends on how the project was created

    Ideally, all of the necessary files for the project to work should be included within the source code for the application. If this is not the case, and you are referencing files (assembles) from elsewhere on the computer, i.e. from the GAC or a Program Files folder, then you will need the equivalent assemblies on your other machine.

    In terms of the files within an application i.e the ASPX and ASPX.CS/VB files, as long as you copy the parent folder, and don't move the child files/folders around, you should be ok.

    Gary

  7. #7

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Hmm, It is worth a try. I'll report later

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  8. #8
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Sounds like a plan

    I am signing off for the night, but I will check back tomorrow.

    Gary

  9. #9

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Thanks Gary, I probably won't be working on this till Tuesday or Wednesday at the earliest after today. So have a Merry Christmas.

    Sierk

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  10. #10
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Quote Originally Posted by Working.Net View Post
    So have a Merry Christmas.
    You too

  11. #11

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    OK,

    I tried copying the project files to the VS 2010 project folder area (in myDocuments) and wouldn't you believe it, darn VS 2010 just had a freaking Cow. When I launch the program it comes up with an unknow error and dies a horrible death! Good thing it is time for a coctail and some snacks. My IS guy will be in to see if he can reverse the damage on Monday. More on this later. have a Merry Christmas everyone and "see" you next week.

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  12. #12
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Wow!

    I can't think of any reason why that would happen! There isn't anything project specific that should cause Visual Studio to throw a wobbler!

    Hope you get this sorted out!

    Gary

  13. #13

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Gary,

    My I.S. guy came in this weekend and fixed my Visual Studio error. So that is running again. I managed to get the project opened, and eliminated all but one error using your suggestion. I have had problems with this issue before and have yet to find a solution. It is a MapGuide Open Source error and as far as I can tell it has something to do with improperly signed .dlls.
    Could not load file or assembly 'MapGuideDotNetApi' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    I found a number of entries, the best suggestion being:
    http://osgeo-org.1803224.n2.nabble.c...td5622823.html
    in which Jackie NG points you to a possible solution:
    http://themapguyde.blogspot.com/2010...mode-with.html

    The only real issue I have with this post is that it is a year old and I find it hard to believe that this has not yet been resolved by the developers of MapGuide OS. It is a major pain in the butt to re-sign the .dlls. I know I have tried, and there is pretty much no guarantee for success.

    PS. I'll be gone Wed and Thu Dec 28 and 29

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  14. #14
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Hello,

    Sounds like you are getting somewhere! Out of interest, what did the guy do to your computer to fix Visual Studio?

    Are you actually trying to sign your application? i.e. are you signing it with a .snk file? If this is the case, then yes, you are going to need to sign the MapGuide assemblies. If you aren't, then I would still suspect that it is missing a reference, and all you need to do is make sure that the assembly, or perhaps an assembly referenced from another assembly, are included in your project.

    Gary

  15. #15

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Gary,

    This is what my IS guy said about fixing VS 2010:
    I ran the repair function (which basically reinstalled the application) and then applied the service pack.
    Nothing special.
    As far as signing goes: Personally I am not signing my application, but since I am in bed with MapGuide the possibility that she requires signing is, well definitely there. However the possibility that we are actually missing a reference is probably just as good.

    At this point I am trying to determine which reference, if any, would be missing. The Reference indicated "MapGuideDotNetApi-2.2" is definitely in the project bin folder. According to other posts it is:
    MapGuideDotNetApi.dll in MGE 2011 (and MGOS 2.2) is nothing but a stub that type forwards to:
    - OSGeo.MapGuide.Foundation.dll
    - OSGeo.MapGuide.PlatformBase.dll
    - OSGeo.MapGuide.Geometry.dll
    - OSGeo.MapGuide.MapGuideCommon.dll
    - OSGeo.MapGuide.Web.dll
    http://osgeo-org.1803224.n2.nabble.c...td5558959.html
    All of which are also in the bin folder. Unfortunately I am not sure how to get VS 2010 to let me know where the problem actually is. I'm looking into that now. Have a Happy New Year, and I'll be back on Tuesday.

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  16. #16
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Is it possible that you can upload the project as it is, or make it available somewhere, for me to take a look at?

    Gary

  17. #17

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Gary,

    Sorry this has taken so long. In response to my asking permission for you to see the code the client has doubled their efforts to try to resolve the issues as well. We now have a 60 day trial version of VS 2010 running on their server. I opened the project as you had suggested before and, well actually nothing changed (Grrrr). Most of the errors look something like this:
    Unable to load referenced library 'C:\inetpub\wwwroot\vmfmobile\Bin\PlatformBaseUnmanagedApi.dll': An attempt was made to load a program with an incorrect format.
    I checked the versions of the dll and they are the same.

    Here is a bit of information I failed to add earlier. Everything is working the way it should when you open the website in a browser. This begs the question: "Why is VS 2010 having a freaking cow"

    Any idea what is going on?
    Last edited by Working.Net; Jan 10th, 2012 at 03:47 PM.

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  18. #18
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Ok, try this...

    Create a brand new project, and attempt to reference the above DLL.

    Do you get the same error?

    Gary

  19. #19

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Hey, thanks for checking in.

    If I reference the .DLLs nothing happens. However that does not place them in the bin folder which, I am pretty sure, is where they should be. So I added the .DLLs using the V.S. "Add Existing" command. Still no trouble. Officially this project bin folder is also supposed to contain a series of sub folders named ar, cs, de, es, fr, he, hi, it, ja, ko , nl, pt, ru, tr-TR, zh-CHS, zh-CHT. Each of these folders contains a "AjaxControlToolkit.resources.dll" file. Though they look the same the size of the files varies from directory to directory. I think this has something to do with language but I am not sure.

    Based on this bit of apparent success, I will try to rebuild the bin folder in my project since originally the files were just copied to the folder in MS Explorer.

    Sierk

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  20. #20
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Hold on a second here...

    Adding a reference to a DLL doesn't necessary add them into the bin folder. Not straight away anyway. If you have set the properties of the referenced DLL to include the DLL in the output folder, then when you build the application, the DLL will be copied into the bin folder. For adding references, there should certainly be no need to use the "Add Existing" command.

    So once again, you shouldn't really be playing manually with the files that are contained within the bin, or for that matter the obj folder. Visual Studio will control what is in these folders based on the settings within the project when it compiles your application.

    Gary

  21. #21

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Thanks Gary,

    If I understand this right I should only use the "Add Reference" utility to place DLLs in the bin folder. I have had no cause to use the obj folder so I will cross that bridge when I get there. If the latter is true, I am coming up with some challenges:

    First, if I am not supposed to manually do anything in the bin folder, how would I go about cleaning up the mess to start again?

    Second: Mapguide requires a number of DLLs to run. If we bypass VS 2010 and just stick them in the bin folder the website works (as we know VS 2010 does not). If I try to reference these DLLs in VS 2010 I get the following error:
    A reference to 'C:\Program Files\OSGeo\Mapviewernet\bin\FoundationUnmanagedApi.dll' could not be added. No type libraries were found in the component."
    I have looked online for a solution to this error but the described answers are all way beyond my comprehension.
    Last edited by Working.Net; Jan 12th, 2012 at 09:29 AM.

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  22. #22
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Quote Originally Posted by Working.Net View Post
    Thanks Gary,

    If I understand this right I should only use the "Add Reference" utility to place DLLs in the bin folder.
    This is not strictly true, no.

    The Add Reference, does just that. It adds a reference to the DLL from your project. During the compilation action, if the properties of the reference are such that the DLL should be copied to the output bin folder, then Visual Studio will copy the DLL from the referenced location into the bin folder. However, you shouldn't place a DLL into the bin folder and reference it from there.

    You should actually be able to close Visual Studio, delete both the bin and obj folders, re-open Visual Studio, build the application, and have everything still work. If this is not the case, then I would suggest that there is something wrong with the setup of your application.

    Quote Originally Posted by Working.Net View Post
    First, if I am not supposed to manually do anything in the bin folder, how would I go about cleaning up the mess to start again?
    Typically what I would is have a folder in the application called "lib" or "Shared Binaries" within the project. Within this folder I would place all of the 3rd party DLL's that my application needs to use, and within the project, I would reference the DLL's from there.

    Quote Originally Posted by Working.Net View Post
    Second: Mapguide requires a number of DLLs to run. If we bypass VS 2010 and just stick them in the bin folder the website works (as we know VS 2010 does not). If I try to reference these DLLs in VS 2010 I get the following error:

    I have looked online for a solution to this error but the described answers are all way beyond my comprehension.
    I really think it would still help to have a look at the application, even a screen shot of the setup to see where things are, and how they all piece together. Just copying the DLL's into the bin folder is not the best idea.

    Gary

  23. #23

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Thanks Gary for taking the time.

    Autodesk, the developer of MapGuide, finally stepped in and provided me with a support incident to help resolve this issue. For now the guy that is helping me has provided me with a link to a presentation he did in which he explains how to set up a 64bit MapGuide Web Application project. I would like you to take a look at it since what "they" are saying flies in the face of what you suggested above. The part I suggest you look at runs for about 7 minutes and is entitled "Build AIMS 2012 Application". It starts about 26 minutes into the presentation though you can access it from the side panel.
    http://download.autodesk.com/media/a...t_English.html

    From watching this presentation I know I missed some of the steps involving setting up the IIS server. In addition this deals with setting up a new application, rather than starting with an existing one. I have requested additional information covering these issues. Daniel is from China so I probably won't hear back from them until Monday. I will however keep you posted, and in light of yesterday's discussion with another Autodesk support representative, who helped me resolve an outstanding FDO driver issue I am encouraged to finally see this project through.

    Have a great weekend, and I'll be in touch next week.

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  24. #24
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Hello,

    I will take a look tomorrow morning.

    Gary

  25. #25
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Hello,

    OK, I have had a quick look at the video, and basically, I don't agree with what they are doing, but it would appear that their technique is to manually copy the DLL's in to the bin folder of your application, then make a reference to it, and then explicitly set the Copy Local" flag to false. I can't think why they would want to do it this way, apart from that they found issues when trying to make it happen, and as a result, they have found a workaround.

    Personally, I would never want to copy any DLL's manually into the bin folder. This flies in the face of all Continuous Integration principles.

    Looks like you might have to do it this way though in order to integrate their product.

    Gary

  26. #26

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Thanks Gary,

    I just got word back from the China support branch that they "can't" help me out because I am working with their open source version of the software. Grrrr, just when I thought I was making some progress. I have tried their method and I could not get it to work on my own. I will continue posting my findings and other questions here. Perhaps I should invite Daniel to join this discussion, Yeah I think that is what I'll do

    Sierk

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  27. #27
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Hello,

    Ah man! That isn't good!

    Did you get the same errors when you tried following along with their demonstration?

    Gary

  28. #28

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Gary,

    I had Daniel look at this post and to his credit he did. This is what he said:
    I agree with Gary in VBForum, generally speaking, for common .net assemblies, we do not need to copy them to <myApp>\bin, VS referencing will do that for us. But for MapGuide .net development, that is not enough, as the .net assemblies for MapGuide is just a thin wrapper of unmanaged library, they are generated by SWIG, it references to other unmanaged libraries, that's why I need to copy all dlls into <myApp>\bin folder and add references there.
    I tried your suggestion to load the DLLs in a new project and I got the same error. I will go back and re-review Daniel's presentation and re-try implementing that.

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  29. #29

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Gary,

    I am finding that Visual Studio is not at all behaving the way that Daniel suggests that it should. I am trying to follow his suggestions and i did the following (tried two different methods)
    First attempt:
    - I deleted the Bin folder (Explorer)
    - Then I added a new Bin folder (Visual Studio > Add.Net folder > Bin folder)
    - Next I closed VS and copied all DLLs as suggested (explorer)
    - Then in VS I added references for the specified files (see post #15.) It created .dll.refresh files but no reference folder.
    - So now I started looking to set "copy local" to false but I could not find it anywhere. Not in the properties, not in the project property pages - nowhere, the files and their dependents were listed as references in the reference tab of the property pages.

    First attempt:
    - I deleted the Bin folder (Explorer)
    - Then I added a new Bin folder (Visual Studio > Add.Net folder > Bin folder)
    - This time in VS I added (existing items) all DLLs as suggested
    - Again in VS I added references for the specified files (see post #15) which created .dll.refresh files but no reference folder (same as before.
    - I started looking to set "copy local" to false but again I could not find it anywhere. Not in the properties, not in the project property pages - nowhere, this time the specified files and their dependents were NOT listed as references in the reference tab of the property pages. Go figure

    I asked my coworker about this and he told me he never saw VS behave in this manner and wondered what project type I had chosen when I created this project. I figured it was ASP.NET Web Application but I'm not sure and I don't know yet how to verify that. I am thinking to maybe try starting from scratch (migrating the application)

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  30. #30

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    OK, I think we got something here. In trying to determine the project type I found that for some reason Visual Studio is not recognizing this as a proper project at all. Perhaps because we "just" copied and opened the Visual Studio Express project (.sln) file. According to the MS instructions for changing your project type when clicking on the project name you should be able to open the properties window from the Project menu item or as it turns out you can get to the same by right clicking on the project name and selecting properties from the context menu. I checked this in the project I created for post #28. Neither option for selecting properties is available in the current project. Houston I think we have a problem!

    Gary perhaps you can suggest the best and most efficient way of creating a new project from the existing one. I am thinking something along the lines of:
    - Create new "Web Application Project"
    - Add DLL's as described above (probably the second method)
    - Add default.aspx and login page
    - Eliminate any errors
    - Set the website up in IIS per Daniel's instructions
    - At this point we should be able to open the base website.
    Once we got this we should be able to add the other pages using the "add existing item" functions.

    Let me know if I missed anything or if I should be paying special attention to something.

    Thanks

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  31. #31

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    OK, made a TON of progress. My coworker Dave, who is much better versed in setting up websites than I, and who also works in VS 2010 (a bonus) helped me set up the new website. And we got past the unpleasantly persistent "Unable to load referenced library 'C:\inetpub\wwwroot\vmfmobile\Bin\PlatformBaseUnmanagedApi.dll': An attempt was made to load a program with an incorrect format." error. So we have a bare bones MapGuide website that allows us to login, and displays a map. Tomorrow I will add in all the missing pieces.

    Dave and I think that a major part of the problem was that the project has been migrated from earlier versions of Visual Studio, and by not creating "new" projects, features, key to VS 2010 projects, were not included and thus causing the errors. We will see tomorrow if I can finish building the application. In the meantime have a great night.

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  32. #32
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Quote Originally Posted by Working.Net View Post
    Gary,

    I had Daniel look at this post and to his credit he did. This is what he said:
    Phew! Glad to hear that I am not going mental!

  33. #33
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Quote Originally Posted by Working.Net View Post
    OK, made a TON of progress. My coworker Dave, who is much better versed in setting up websites than I, and who also works in VS 2010 (a bonus) helped me set up the new website. And we got past the unpleasantly persistent "Unable to load referenced library 'C:\inetpub\wwwroot\vmfmobile\Bin\PlatformBaseUnmanagedApi.dll': An attempt was made to load a program with an incorrect format." error. So we have a bare bones MapGuide website that allows us to login, and displays a map. Tomorrow I will add in all the missing pieces.

    Dave and I think that a major part of the problem was that the project has been migrated from earlier versions of Visual Studio, and by not creating "new" projects, features, key to VS 2010 projects, were not included and thus causing the errors. We will see tomorrow if I can finish building the application. In the meantime have a great night.
    What version of Visual Studio was the project originally created in? I have upgraded a number of projects to Visual Studio 2010, and it has always just worked.

    Could it be that the original project was a Web Site Project rather than a Web Application? And that this is causing problems?

    Sounds like you are getting somewhere though!

    Gary

  34. #34

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Quote Originally Posted by gep13 View Post
    What version of Visual Studio was the project originally created in? I have upgraded a number of projects to Visual Studio 2010, and it has always just worked.

    Could it be that the original project was a Web Site Project rather than a Web Application? And that this is causing problems?
    It is hard to tell. It might have been 2005, it's been at least 2 years since I started working on this project. As far as the type can't tell that either. I looked for a way to determine the project type on line but I could not find one. Oh well, it is water under the bridge now. I will post my progress and hopefully I won't have any further issues with this migration.

    Thanks for your help.

    Sierk

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  35. #35
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Sounds like a plan!

  36. #36

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Gary,

    I am glad you are watching. Everything "seems" fine until I add a new webform to the root of the project and then all my .dll's blow up. I thought that since these were not in the reference list I could add them (as a reference that is) but then I get the dreaded:
    A reference to 'C:\etc\bin\named.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component
    This does look sort of familiar, kind of where I was a couple of weeks ago. I looked for answers on line but the stuff is so way beyond my comprehension I wouldn't even know where to start. The one thing I did understand was ".dll hell"

    Any thoughts? (besides stepping off the sidewalk into fast moving traffic)

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  37. #37
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Ok, so hold on, let's back up a step here...

    You had a sample application working that had a Map added to the page, correct?

    Are you saying that you then add another Web Form to the Project, and at that point it stops working? I don't see how adding another Web Form to the project would require the addition of more references?!?

    I think that I might be missing something.

    Gary

  38. #38

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Hey,

    I think that I am actually missing something. The web site itself works the same, but Visual Studio just has a cow. Many of the DLLs are no longer recognized, giving me a
    Unable to load referenced library 'C:\inetpub\wwwroot\vmfmobile2\Bin\lib_json.dll': An attempt was made to load a program with an incorrect format.
    error. There are about 34 of those (about 16 different DLLs) I continued searching on-line yesterday for an answer and I have the feeling it has something to do with the bit-ness of the DLL's. But I could not find an answer to the problem that worked or was within the grasp of my understanding. I tried and checked a few suggestions, like making sure that the platform and Target CPU settings were pointing to "AnyCPU" But that did not change anything.

    Also, check this out, definitely part of the problem (Fudgicles, there should be an answer in there somewhere):
    http://osgeo-org.1803224.n2.nabble.c....html#a7178254
    Last edited by Working.Net; Jan 20th, 2012 at 08:48 AM.

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

  39. #39
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: Issues with moving a project to Visual Studio 2010

    Sorry, I am not sure what else to suggest

    Gary

  40. #40

    Thread Starter
    Hyperactive Member Working.Net's Avatar
    Join Date
    Aug 2010
    Posts
    383

    Re: Issues with moving a project to Visual Studio 2010

    Quote Originally Posted by gep13 View Post
    Sorry, I am not sure what else to suggest

    Gary
    We are asking the client if they'd mind installing the 32 bit version of the software since the impact of the 64 bit version will probably be less than marginal on account that the website will never get hit by 1000s of users. If they still would like to go with the 64 bit version we will have to separate the development from the production environment which at this time are one and the same. Thanks for your help, and I will let you know what is decided and how it went (I really hope all goes well )

    As I stand here, on the fringes of my understanding, and look out over the
    vast void before me, I realize all that lies ahead: The rest of Dot.Net. . .

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.