Visual Studio, how to finish up solution and deploy? - powershell

I'm an CS intern working at a company that primarily develops using .NET and Microsoft. I've been using Visual Studio sparsely, and now I'm kind of stuck.
I tried building a NugetGallery using IIS EXpress, and the nuget feed works.
http://localhost:88/PSGallery/ gives me my nuget feed alright.
But how I do I finish up in Visual Studio? I can run this with VS, but the instant I close VS, my website goes down. I've tried building it and I think it only outputs
NugetPowerShellGallery\NugetHost\bin\NugetHost.dll
What am I supposed to do with this? How do I make it just run indefinitely?
On a sidenote, how can I display this website on the local network as http://JohnS/PSGallery/

Related

Multi-threaded Debugging in Visual Studio Code

I've been working on a Powershell script that was handed to me. Never having dealt with powershell scritps before, I have a lot to learn. I have been using Visual Studio Code to run/debug it up until this point. It has been working well however, I'm running into an issue in a particular area that deals with multiple threads. I am unable to pause the Powershell script on specific breakpoints.
After looking all over the past couple of days and it seems that threading is something that can be worked on within Visual Studio. I downloaded Visual Studio Community 2019 and have tried to install the "Powershell Tools for Visual Studio" suite. According to the package manager, it has installed without issue. However, I am unable to create a Powershell project (which I should be able to do) and I cannot see it within the extension manager in Visual Studio 2019. To make sure it wasn't an error on my part, I've attempted the installation several different times and with different methods.
I've also looked at Windows built-in Powershell ISE for debugging but run into the same issue that Visual Studio Code has. This is rendering me unable to properly debug in the specific spots that I need to looking at. I have used Write-Host throughout most of the script however, as this is a script that was handed to me, I'd much rather be able to pause and look at all variables in a given state without having to print them all.
Is there any way to easily debug multi-threaded apps within Visual Studio Code? If there isn't, what would be some recommendations besides adding Write-Host,Write-Debug or similar cmdlets.
You are confusing tools and use case and this is due to your misunderstanding of PowerShell and the tools to deal with that, and that would be expected if you've never done this before.
If you have no PowerShell experience, its best to get ramped up first. Jumping into a tool for a language you've never used or understand is not prudent. Jump on Youtube and search for 'Beginning PowerShell' and view some of those before moving any further.
This is not a PowerShell code issue, which is what we are here to help with.
Your question is 'How do I configure VSCode and/or Visual Studio for Powershell development?, and thus off-topic for StackOverflow, and more a question for SuperUsers or StackExchange.
How do I ask a good question? - Help Center - Stack Overflow
Yet since you are here and I use this addon, let me provide some edification.
VSCode has an extension from Microsoft for PowerShell development, but that is just the Microsoft PowerShell extension.
The PowerShell Pro Tools for Visual Studio /VSCode is not a free tool and not from Microsoft. You have to pay for it to enable all
its features. You only need one copy/license of PowerShell Pro Tools
to use in Visual Studio/VSCode.
PowerShell Pro Tools Suite
https://ironmansoftware.com/powershell-pro-tools
PowerShell Pro Tools
PowerShell Pro Tools adds script packaging, a Windows Form Designer,
code conversion and a Universal Dashboard previewer to VS Code.
PowerShell Pro Tools provides Visual Studio integration through
the PowerShell Tools for Visual Studio. The Visual Studio integration
provides the following features. Packaging as executables including
command line utilities and services Windows Forms Designer WPF
Designer Integration Code Conversion
You can view how to use the tool buy view the docs from Ironman software the author of the product or on Youtube. Just search for it.
'powershell pro tools for VSCode'
'powershell pro tools for vscode projects'
'powershell pro tools for Visual Studio'
'powershell pro tools for visual studio projects'
I know this is relatively old, but it is worth noting if this shows in future search results. What VSCode can do, vs what you can do with PowerShell in VSCode.
I have done multithread in C# with VS Code debugging, but I am not aware of a good process for this in PowerShell. I assume that this is a question of support by the extension, but also the complication, of the various ways that PowerShell avoids or hides literal threading.
PowerShell abstracts async different than other languages.
Jobs can be threads, or process
Events may trigger and queue into the primary thread
Runspaces are whole environments on another thread, which can interact with each other.
Someone may be able to give a better summary on these, but "It is complicated"
I've decided the answer to this is no...
It should be as easy as put the breakpoint, hit the breakpoint, until ms supports this, its way behind any other decent scripting language. I'm thinking to unthread my application to make my life easier which is pretty sad state of affairs. Might try spinning up full visual studio to see if its better first.

Target users of Visual Studio Code?

I've been developing on Visual Studio, and here comes Visual Studio Code which is described as a source code editor that supports multiple platforms. For me, I find it promising considering it's a lightweight editor compared to Visual Studio.
Since Visual Studio Code is still a baby, is it safe to say as time passes by and this baby becomes mature, this will be the new Visual Studio considering it can run on multiple platform?
Does Visual Studio Code has a roadmap on the upcoming features?
Visual Studio Code will not replace the regular Visual Studio, if that's what you're asking. VSCode is intended to be a very lightweight, code-focused IDE. There are a plethora of features present in Visual Studio that I don't expect we'll ever see in VSCode simply because they are not within the scope of the project. For example, I don't think you'll ever see the designer in VSCode, which is something you would sorely miss if you were developing a WPF or WinForms application.
Right now VSCode seems to be mostly targeting web application developers using ASP.NET 5 and node.js.
As for what's ahead for VSCode, I'm not sure if a roadmap has been laid out anywhere but I do know that a plugin/extension system is in the works, along with ES6/7 support and a few other things.
If you want to follow the development of VSCode, check out their blog, Twitter, and UserVoice.

using NuGet with Visual Studio 2005

What would be the most frictionless workflow for working with NuGet and Visual Studio 2005? Is this at all possible? I understand that the plugin is only available for Visual Studio 2010, but there is still the package manager console wich seems to be nothing more than powershell. Can I run the console without Visual Studio and can the console download and integrate packages into visual studio 2005 projects? If so, how is this done?
Scott Hanselman blogged about adding NuGet "support" to Visual Studio 2008. You can probably adapt this slightly to work in Visual Studio 2005 too, though of course you won't get the same experience as in Visual Studio 2010.
Well, not really. A better title would be "How to Cobble Together
NuGet Support for Visual Studio 2008 with External Tools and a
Prayer." The point is, there are lots of folks using Visual Studio
2008 who would like NuGet support. I'm exploring this area and there's
a half-dozen ways to make it happen, some difficult and some less so.
The idea would be to enable some things with minimal effort. It'll be
interesting to see if there are folks in the community who think this
is important enough to actually make it happen. Of course, the easiest
thing is to just use 2010 as it sill supports .NET 2.0, 3.0, 3.5, and
4, but not everyone can upgrade.
Someone could:
Backport the existing NuGet Package References dialog to 2008 using
that version's native extensions (not VSiX)
Create MEF (Managed
Extensibility Framework) plugins for the nuget.exe command-line to
update the references in a vbproj or csproj
Use PowerShell scripts and
batch files to get the most basic stuff working (get a package and
update references.)
Maybe write a shim to get DTE automation
working...
But that's coulds and maybes. Let's talk about the MacGyver
solution. more »

Problems deploying a WinForms app that uses Microsoft ReportViewer

I have published a WinForms application from Visual Studio 2010. It uses .NET 4.0. in the prerequisite dialog in Publish pane I selected .NET 4.0 Client Profile and Windows Installer 3.0. After publishing application to disk, I migrated it to client's computer which first installed .NET Client Profile and after reboot it gave following error message:
Unable to Install or run application. The application requires that assembly, Microsoft.ReportViewer.Common version 10.0.0 in global assembly cache first.
After this message the installation process exits. I'm using .NET's report in my project (not Crystal Reports).
You have to deploy the ReportViewer controls separately.
Check here on MSDN for more information: Deploying Reports and ReportViewer Controls
The ReportViewer control redistributable is a self-extracting file named ReportViewer.exe that includes an .msi and other files. You can find ReportViewer.exe at the following location:
%PROGRAMFILES%\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\ReportViewer\ReportViewer.exe
You can also download it from the Microsoft Download Center.
[ . . . ]
The type of control you are using
determines where ReportViewer.exe
should be run.
For ASP.NET applications, run
ReportViewer.exe on the Web server
that hosts your application. This must
be done by a server administrator.
For Windows Forms applications,
include the controls as an application
prerequisite so that they are
installed automatically with your
application. You can use the
bootstrapping application to automate
this step:
Open the project properties page.
Click Publish, and then click
Prerequisites.
Select Microsoft Visual Studio 2010
Report Viewer, and then click OK.
Publish the application.
During application installation, a
check is performed on the local
computer to see if ReportViewer is
already installed. If it is not
installed, the Setup program will
install it.
I guess this is probably a new VS2012 feature, but you now can deploy Report Viewer (and the SQL Server CLR Types) with Forms / WPF click once installations.
Open the project properties page.
Click the Publish tab, and then click the Prerequisites button.
Select Microsoft Visual Studio 2012 Report Viewer, and SQL Server
CLR Types then click OK.
Make sure that the Download prerequisites from the component
vendor’s website option is checked. This is the only supported
option. Then, click OK.
Click the Options button.
In the Deployment tab, specify a deployment Web page and select the
Automatically generate deployment web page after ever publish
checkbox.
Click OK and publish the application.
look at this: Running ReportViewer.exe
both we are gave you same link. it will help you
Download and install Microsoft Report Viewer 2012 Runtime CTP from following url...
http://www.microsoft.com/en-in/download/details.aspx?id=27230
I had same problem but it solved after install the above...
Thanks...
I had the same problem for months, one machine cat v.11 installed (manually by adding some components) and another had v.10 (from the ms framework itself), when I did the publish from my machine, it gave the error.
here is how I fixed it,
In Nuget, there are 2 packages,
Microsoft.ReportViewer.Windows (Microsoft.ReportViewer runtime 2012) and
ReportViewer.Common 10.0
I installed them both, now its working quite all right
Open project properties Alt+Enter.
Click on publish tab.
Click on prerequisites select Microsoft visual studio report viewer.
visit this website for more detail
https://msdn.microsoft.com/en-us/library/ms251723.aspx

Mercurial and SQL Server Management Studio GUI plugins?

Does no such plugin exist?
So to be clear, I realize that RedGate has their own SSMS SCC app, and I realize that VSS2k5 will integrate in. I'm looking to stay with Hg as that's where my source already is, and I'ld like to find something that my team can stay consistent with on their tools.
As is, I guess I'm going to have to just run it through TortoiseHg and a folder with manual maintenance. Which isn't terrible, but naturally it would be nicer if there was an app pre-existing that I could consume.
And no, I don't have the time or inclination to write one myself. Not before Summer 2011.
Thoughts or ideas?
There are two versions of HgScc plugin:
HgScc - uses old MS SCCI API, works with MS VS2005/2008/2010 and with some third party IDEs. Last version of this plugin was released in 2008. It is not actively developed anymore, because MS SCCI API is very limiting and does not allow a tight integration with Visual Studio.
HgSccPackage - uses MS SCC Package, works only with MS VS2008/2010. This version of plugin currently in active development.
To get the first version of HgScc follow the instructions here:
MSSCCI compliant Mercurial client
Red Gate SQL Source Control is looking into supporting Mercurial in a future version, http://redgate.uservoice.com/forums/39019-sql-source-control/suggestions/803713-mercurial-support-as-source-control-system.
SQL Server 2012 (Denali) is using the Visual Studio 2010 Shell as the basis for the new Management Studio. I haven't tried it yet but I am hoping that tools such as VisualHg will work in Sql Server 2012. I will update this post after I get on my laptop that has the 2012 SQL Management Studio installed.
Have you tried hgscc? I know it integrates with Visual Studio, but I haven't tried it with SSM