locked
Does Visual C# 2012 Express have the "NuGet" packge to do the Open-Source GIS in DotSpatial?

    Question

  • Hi all,

    Visual C# 2010 Express could not take the existing "NuGet" package to do the Open-Source GIS in DotSpatial. I don't know whether the sophisticated 64-bit Visual C# 2012 Express has the NuGet package to do the Open-Source GIS in DotSpatial or not.  Please kindly help and advise.

    Thanks,

    Scott Chang



    Tuesday, November 27, 2012 2:24 PM

Answers

  • Hi Scott_Chang,
    1) .Please follow below  steps to find these packages for DotSpatial:
    Open VS Express – open a solution / a project - TOOLS – Library Package Manager-Manage NuGet  Packages for Solution… - type “DotSpatial ”into  the search bar click Online Options in the left side and you will get these packages.
    Here is the complete screenshot:


    2). As  I said before, I am not familiar with DotSpatial, for “creating the DotSpatial 1.4 tools” questions,

    please ask in:  http://social.msdn.microsoft.com/Forums/en-US/Offtopic/thread/ee6ee11a-2eaf-40cb-a01e-bf169be59142
    Thanks for your understanding.
    Regards,


    Lisa Zhu [MSFT]
    MSDN Community Support | Feedback to us



    Friday, November 30, 2012 10:19 AM
  • Hi Scott_Chang,

    Welcome back!

    Ok,  I will try my best to explain that video for you( create me if I am wrong somewhere). From that video, I think it can conclude below steps:

    1. Add Dotspatial Controls in VS2010 Express. You can add all this Dotspatial  Controls in  a new tab.

      • Right-click on any existing tab and choose Add Tab from its shortcut menu.
      • In the text box at the bottom of the Toolbox, type a name(e.g. Dotspatial  ) for the new tab and then press ENTER.
      • Right-click Dotspatial   tab, choose Items…-  choose .NET Framework Componets - Click Browse.

      The Open dialog box appears.

      • In the Folders pane, select My Computer to browse for items installed on your computer drives.(In the video it add DotSpatial.Comtrols.dll )
      • Select the Dotspatial  Controls  and Click OK. 

      2 .Design the form.

      • In the Design page of Form, drag the SpatialStatusStrip and SpatialToolStrip in Form1.
    • Find SplitContainer in All Windows Forms tab and drag into  Form1, and TabControl in the left panel , Map( under Dotspatial tab ) in the right panel.
    • In the TabControl, rename tabpage1 as Legend and drag Legend (under Dotspatial tab) in it; rename tabpage2 as Toolbox and drag ToolManager (also  under Dotspatial tab) in it.

    Attention, you should set the Dock property of all the controls(except SpatialStatusStrip, SpatialToolStrip, TabControl ) to Fill. More information, please refer to: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.dock.aspx

    •      In the properties of map1 - set the Legend to legend1 –ProgressHandler to spatialstatusStrip
    •      In the properties of SpatialStatusStrip – set Map with map1.

    3 .Try to build this project.

    • Right-click the project – Properties- In the Application tab, set Target framework to .NET Framework 4 –Save
    • Right-click the References folder under the project – Add Reference…- Dotspatial.Data.dll , Dotspatial.Data.Form.dll, Dotspatial.Symbology.dll –OK
    • Start this project.

    Hope this helps.

    Regards,


    Lisa Zhu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Tuesday, December 04, 2012 3:42 AM

All replies

  • Hi Scott_Chang,

    I don’t know much about DotSpatial, but if you want to know that if there are some NuGet packages for DotSpatial, the answer is Yes. Here is a screen shot :

    By the way, for DotSpatial related questions, I would suggest you to ask in: http://social.msdn.microsoft.com/Forums/en-US/Offtopic/thread/ee6ee11a-2eaf-40cb-a01e-bf169be59142

    Thanks for your understand.

    Regards,


    Lisa Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, November 29, 2012 5:53 AM
  • Hi Lisa, Thanks for your nice response.

    1) Where did you get that screenshot for DotSpatial you posted?

    2) I am just an end-user of Visual C# Express. Last time, I could not get the NuGet working with Visual C# 2010 Express in my PC. This time, I can't find and get the "Reference" of DotSpatial connected in the Toolbox (in the left pane) and the References of Solution (in the right pane) of my newly installed Visual C# 2012 Express that has the "NuGet" set up already as you pointed out.  I am completely lost in trying to get the DotSpatial program created in a new project and the visual components and references wired up in my Visual C# 2012 Express.  Please kindly help me in finding and getting the DotSpatial linked to Visual C# 2012 Express (i. e. getting the reference of DotSpatial appeared in my Visual C# 2012 Express).

    Please respond again.

    Thanks in advance,

    Scott Chang

    Thursday, November 29, 2012 1:08 PM
  • Hi Lisa,

    From the http://dotspatial.codeplex.com/downloads, I just saw a new DotSpatial 1.4 release on Nov 14, 2012: (1) DotSpatial 1.4 Minimal.zip, and (2) DotSpatial 1.4 Extended.zip.  I used to play the DotSpatial 1.0 a little bit in Visual C# 2008 Express with help from the DotSpatial experts a couple years ago. I had some difficulties in using DotSpatial 1.1 with Visual C# 2010 Express (the NuGet problem) and I gave up this DotSpatial 1.1 with Visual C# 2010 Express Open-Source GIS programming 9 months ago.  Now, our organization gave/refreshed me a computer of Dell T1600 and installed Window 7 and Visual Studio 2012 Express in my new computer recently.  Thus I try to use Visual C# 2012 Express to do the Open-Source GIS via DotSpatial 1.4 now.  I am very shaky to set up the DotSpatial 1.4 class library, to create the DotSpatial 1.4 tools, to add the DotSpatial 1.4 references, etc. in my first "Window"-application project of Visual C# 2012 Express. I downloaded and unzipped the DotSpatial 1.4 Minimal in my C://DotSpatial14Minimal folder - I just see many .dll files and I can't put them in the References of Solution of my first "Window"-application project  and I am not able to handle the References of Assemblies (Framework & Extensions), Solution (Project), and COM now.  I read How to: Add or Remove References in Visual Studio and gain little from the reading.  Could you please kindly help me in setting up the DotSpatial 1.4 class library, creating the DotSpatial 1.4 tools, and adding the DotSpatial 1.4 references (from the .dll files in my C://DotSpatial14Minimal folder) into Visual C# 2012 Express? Please respond.

    Thanks in advance,

    Scott Chang 

    Thursday, November 29, 2012 8:03 PM
  • Hi Scott_Chang,
    1) .Please follow below  steps to find these packages for DotSpatial:
    Open VS Express – open a solution / a project - TOOLS – Library Package Manager-Manage NuGet  Packages for Solution… - type “DotSpatial ”into  the search bar click Online Options in the left side and you will get these packages.
    Here is the complete screenshot:


    2). As  I said before, I am not familiar with DotSpatial, for “creating the DotSpatial 1.4 tools” questions,

    please ask in:  http://social.msdn.microsoft.com/Forums/en-US/Offtopic/thread/ee6ee11a-2eaf-40cb-a01e-bf169be59142
    Thanks for your understanding.
    Regards,


    Lisa Zhu [MSFT]
    MSDN Community Support | Feedback to us



    Friday, November 30, 2012 10:19 AM
  • Hi Lisa,

    I know you are not familiar with DotSpatial. I need your "general, logic" expertise of VS/VC# to get the References and Toolbar of DotSpatial 1.4 set up in my first Visual C# 2012 Express project.  This morning, I just highlighted all the .dll files in the folder of DotSpatial 1.4 that was download from the DotSpatial/Downloads site, clicked and added the dll file one by one to the Reference of Solution of my first project. I got all the DotSpatial references installed in the Solution of my first project.  Now I am trying to create the Toolbar of DotSpatial 1.4 on the top of the Windows Form. Please help me in this task - use your "general" expertise and tell me how I can create the Toolbar of DotSpatial 1.4 on the top of the Windows Form.

    Please respond.

    Thanks,

    Scott Chang

    P. S. Please view http://screencast.com/t/htiyqvLh for creating a new project and getting the visual components and references wired up in Visual C# 2010 Express - I could not catch some missing steps in this Video.  You are an expert of VS and you can understand what was clicked to get the Toolbar of DotSpatial. Please kindly help me and tell me how I can get the Toolbar of DotSpatial on the top of Wondows Form.


    • Edited by Scott_Chang Monday, December 03, 2012 8:28 PM
    Monday, December 03, 2012 8:26 PM
  • Hi Scott_Chang,

    Welcome back!

    Ok,  I will try my best to explain that video for you( create me if I am wrong somewhere). From that video, I think it can conclude below steps:

    1. Add Dotspatial Controls in VS2010 Express. You can add all this Dotspatial  Controls in  a new tab.

      • Right-click on any existing tab and choose Add Tab from its shortcut menu.
      • In the text box at the bottom of the Toolbox, type a name(e.g. Dotspatial  ) for the new tab and then press ENTER.
      • Right-click Dotspatial   tab, choose Items…-  choose .NET Framework Componets - Click Browse.

      The Open dialog box appears.

      • In the Folders pane, select My Computer to browse for items installed on your computer drives.(In the video it add DotSpatial.Comtrols.dll )
      • Select the Dotspatial  Controls  and Click OK. 

      2 .Design the form.

      • In the Design page of Form, drag the SpatialStatusStrip and SpatialToolStrip in Form1.
    • Find SplitContainer in All Windows Forms tab and drag into  Form1, and TabControl in the left panel , Map( under Dotspatial tab ) in the right panel.
    • In the TabControl, rename tabpage1 as Legend and drag Legend (under Dotspatial tab) in it; rename tabpage2 as Toolbox and drag ToolManager (also  under Dotspatial tab) in it.

    Attention, you should set the Dock property of all the controls(except SpatialStatusStrip, SpatialToolStrip, TabControl ) to Fill. More information, please refer to: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.dock.aspx

    •      In the properties of map1 - set the Legend to legend1 –ProgressHandler to spatialstatusStrip
    •      In the properties of SpatialStatusStrip – set Map with map1.

    3 .Try to build this project.

    • Right-click the project – Properties- In the Application tab, set Target framework to .NET Framework 4 –Save
    • Right-click the References folder under the project – Add Reference…- Dotspatial.Data.dll , Dotspatial.Data.Form.dll, Dotspatial.Symbology.dll –OK
    • Start this project.

    Hope this helps.

    Regards,


    Lisa Zhu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Tuesday, December 04, 2012 3:42 AM
  • Hi Scott_Chang,

    I provisionally marked my reply as answer.

    Please  feel  free to unmark it if you think the information does not help.

    Regards,


    Lisa Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, December 07, 2012 9:23 AM
  • Hi Lisa, Thanks for your nice, useful response.

    1) I got all the References of DotSpatial 1.4 to the References of Solution of my first VC# 2012 Express project by right-clicking the "References" => "Browse" button => clicking the "Add" button for the downloaded DotSpatial 1.4 dlls in my C:/Drive.

    2) In the Toolbox, I saw (i) Menus & Toolbar that has Pointe, ContentMenuStrip, MenuStrip, StatusStrip, ToolStrip, ToolStripContainer, (ii) Components that has Pointer, BackgroundWorker, DirectoryEntry, DirectorySearcher, ErrorProvider, EventLog, FilweSystemWatcher, HelpProvider, ImageList, MessageQueue, PerformanceCounter, Process, Serial Port, ServiceController, Timer. ......

    I studied your last post closely - Step 1. Add DotSpatial DotSpatial Controls in VS2010 Express.....NET Framewok Components - click browse; Step 2. Design the form ....; Step 3. Try to build this project.......  I found in my VC# 2012 Express that there is no  ".NET Framework Components - click browse" for me to click!!??   I am struggling in this Step 1 now.  I got 2 screenshots and saved them in the MS Work 2007 .docx file, but I can't attache them in this thread/post.  Is any way I can attach my .docx file in the MS "social" Forums?  How did you add the screenshot of your November 2012 post in your thread/post?  Please teach me how to add the screenshot to the thread/post of MS "social" Forums and enligten me how I can do Step 1 for the ".NET Framework Components"/Toolbar (I need) in VC# 2012 Express.

    Please kindly help me and respond again.

    Thanks again,

    Scott Chang         


    • Edited by Scott_Chang Monday, December 17, 2012 6:55 PM
    Monday, December 17, 2012 4:53 PM
  • Have you followed these three steps as Lisa suggested (specifically the third option):

    • Right-click on any existing tab and choose Add Tab from its shortcut menu.
    • In the text box at the bottom of the Toolbox, type a name(e.g. Dotspatial  ) for the new tab and then press ENTER.
    • Right-click Dotspatial   tab, choose Items…-  choose .NET Framework Componets - Click Browse.

    The first two options above are optional.  If you right click anywhere in the toolbox on the context menu that pops up, you should see an item called "Choose Items...".  When you select that, the "Choose Toolbox Items" dialog should appear.  On that dialog, select the ".NET Framework Components" tab.  Then in the lower right hand portion of that dialog, there is a Browse button.

    Friday, December 21, 2012 10:14 PM
  • Hi Lisa and Chris,  Thanks for your nice, valuable responses.

    1. Last month, I got the dll files of DotSpatial.Compatibility, DotSpatial.Controls, DotSpatial.Data, ... , DotSpatial.Topoly to the References of my first project "scWindowFormsApplication1",  Yesterday, I figured out and understood what you said about the "DotSpatial" tab - I managed to get the "DotSpatial" tab in the Toolbox (in the left Pane): AppManager, LayoutControl, LayoutDocToolStrip, LayoutInsertToolStrip, LayoutListBox, LayoutMapStrip, LayoutMenuStrip, LayoutPropertyGrid, LayoutZoomToolStrip, Legend, Map, Modeler, SpatialStatusStrip, SpatialToolStrip, and ToolManager. Then I dragged and dropped SpatialToolStrip and SpatialStatusStrip on the surface of Windows Form. I clicked on "Save All" button. Few minutes later the program asked me to save the solution, project,... I clicked OK and exited my project.  This morning, I tried to open my "scWindowFormsApplication1" and I saw the following error:  

    To prevent possible data loss before loading designer, the following error must be resolved: 1 Error - Object reference not set to an instance of an object. Instances of this error (1) 1. Show Call Stack. ....

    I do not know how to resolve this error to get the right surface of the Windows Form with the right Design. I am lost completely now.  Please kindly help me again and tell me how I can resolve this error and get the right surface of Windows Form back for continuation of my adding the other MapWindow Components in my first project "scWindowFormsApplication1".

    2.  I have difficulties to attach the screenshot, Microsoft Word docx file that has some screenshots or texts, etc. on my post of this Forum.  Please instruct me how I can attach the screenshot, Microsoft Word docx file that has some screenshots or textx, etc. on my post of this Forum.

    Please respond again.

    Many Thanks,

    Scott Chang

    P. S.  I used to save the screenshots, texts, docx files in a free URL/http site for viewing in the post of the Forum of DotSpatial.codeplex.com - e.g. http://www.ge.tt/.  The http://www.ge.tt/ was not working for me 5 months ago.  Do you know any other sites that serve thid kind of document viewing things?    

    Thursday, January 03, 2013 1:54 PM
  • Hi Lisa and Chris,

    Please view http://www.ge.tt/7SPUEeU/v/0 for the error message I mentioned in my post.

    Thanks,

    Scott Chang

    Thursday, January 03, 2013 2:44 PM
  • Hi Lisa, Chris and Experts of Visual C# 2012 Express,

    I updated the error message in http://www.ge.tt/.  Please view http://www.ge.tt/1r7efU/v/0 for details of the complete error message. I hope that you can help me in resolving this error/problem.

    Thanks,

    Scott Chang

    Thursday, January 03, 2013 7:55 PM