ClickOnce Deployment for a C++/CLI Project using Visual Studio 2008 - visual-studio

How do I publish a C++/CLI Windows Forms project for ClickOnce deployment? The properties window for C++/CLI projects does not include a "Publish" tab (like in the C# projects).

You can follow the guidelines for manually deploying a ClickOnce application on MSDN.
This relies on the Windows Software Development Kit and command line tools instead of Visual Studio to do your deployment.
Just another note with this - if you can, I'd recommend trying to migrate to /clr:pure if possible. If you're working with native code, this won't work, but if it's a pure windows forms app, it will make the deployment scenario simpler, since you'll have fewer issues in ClickOnce with CAS requirements.

You cannot ClickOnce deploy an exe written in unmanaged code. The standard approach is to create a managed code stub exe that would launch your actual application.
Here's a related question.

Related

Can I use Visual Studio Code and Visual Studio Community interchangeably for .NET CORE Web API

Please note that I am new to front-end and back-end Web API development.
I am not sure if this is possible, and I suspect it is not, but I am wondering if anyone knows whether or not it is possible to modify a .NET CORE Web API with both Visual Studio Code and Visual Studio Community? I suspect it is not because VS Community creates the project with a solution files whereas VS Code does not.
The reason for doing this is that I like the CLI nature of Visual Studio Code to create .NET CORE Web API's that can be developed in tandem with a EmberJS front-end framework. However, I much prefer Visual Studio Community's debugger and intellisense for more advanced development of the back-end. This is purely a preference and not necessarily a show stopper.
Update:
If it is possible, can you please provide the series of commands I would need to issue in order to create a dotnet webapi and add it to a dotnet sln?
Update 2:
The dotnet CLI website does not show how to add a dotnet webapi project template (with a corresponding solution file), which provides a base set of files to create the Web API. From what I can tell, we can add individual files (i.e., *.csproj). Is there a way to create a dotnet webapi project template with a corresponding solution file all at once; or do I have to either add each file manually in VS Code or just create a Web Api in VS Community and then work with it in VS Code?
Reference: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-sln
Q&A Style:
I am not sure if this is possible, and I suspect it is not, but I am wondering if anyone knows whether or not it is possible to modify a .NET CORE Web API with both Visual Studio Code and Visual Studio Community?
It is possible. I use VSCode and vim on this: https://github.com/sillsdev/appbuilder-portal (which is a .netcore + React app)
However, I much prefer Visual Studio Community's debugger and intellisense for more advanced development of the back-end.
VSCode has a .net core debugger and intellisense. you may need to install the C# extension.
If it is possible, can you please provide the series of commands I would need to issue in order to create a dotnet webapi and add it to a dotnet sln?
dotnet --help can walk you through this, if you don't feel like looking up docs. Here are the docs though, if you want to bookmark this or somethin': https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-sln
dotnet sln add path/to/project.csproj
Is there a way to create a dotnet webapi project template with a corresponding solution file all at once; or do I have to either add each file manually in VS Code or just create a Web Api in VS Community and then work with it in VS Code?
I think in the CLI, this needs to be multiple commands.
dotnet new webapi
dotnet new sln
dotnet sln add *.csproj
hope this helps

Can I manually install a windows service application using VS 2010 Express?

I have created a Windows Service Application and attempted to install it using installutil. But it doesn't show up in my services list. After doing a lot of research I concluded this is because I do not have access to the Setup Project template VS2010 Professional provides. I only have VS2010 express.
I need to mimic any code and configuration for installing a Windows Service Application but without creating a Setup Project in VS 2010. I only have VS2010 Express and want to toy around with creating a service for my home PC.
In other words, is it even possible to hand code what a Setup Project template provides in VS 2010?
If so, what are the essential steps? Are there any tutorials available for how to accomplish this?
Thanks.
the only thing you will need is a class which you will need to derive from ServiceBase and is instantiated from Program.cs.
Just compile and put your project output somewhere on your filesystem, open a command prompt and do InstallUtil your-assembly.exe.
Please note that you should use InstallUtil of .Net 4.0 (instead of 2.0).
On my PC, I use InstallUtil from C:\Windows\Microsoft.NET\Framework\v4.0.30319

Visual Studio 2008 Publish Feature in a desktop app. What are the benefits?

Today I tried to use the publishing feature with visual studio, which creates an application manifest, and not a traditional exe.
What are the benefits of this?
I noticed each time the app starts up it does some kind of check before launching in?
When using Publish on a Windows application, you create a ClickOnce installer. You can find a lot of information about that in the official documentation. Basically, this is an alternative to creating a conventional MSI-based setup project (File/New/Project/Other Project Types/Setup and Deployment/Setup Project).
On MSDN you can find a comparison of the two approaches.

How to run an ASP.NET Application on Another System?

I have developed an ASP.NET web application in visual studio 2008. I want to run the same application on another system, but Visual Studio is not installed on that system. Is there a way I can run without visual studio?
I heard about deploying, but I don't know much about it.
You can publish your site from Visual Studio to a server that's running IIS, more info here:
How to: Publish Web Application Projects
You can use the built-in deployment features of Visual Studio (right click on the web project, select publish and follow the prompts) or you can simply copy all the dlls plus your content files from the web project to the IIS folder you want to deploy to (known as xcopy deployment). You could also deploy via a setup project, which will create an MSI package, but that's a bit more work. Here's a couple of links that might help, but you can do a search for the options described above and you will find plenty of resources:
Deploying ASP.NET Applications - Part 1
Deploying ASP.NET Applications - Part 2

Visual Studio 2005: File->New->Project vs File->New->Web Site?

Say I want to create vb.net application in Visual studio 2005.
What is the difference between File->New->Project vs File->New->Web Site?
EDIT
I am aware that when using New->Project there are many more options available but if one wants to create just .net web application, would it make a any difference what option you choose?
Here's a good link about WAPs (web application projects) and the differences between WAPs and website projects.
In 2003, your only option (if I recall correctly) was the WAP. 2005 introduced the concept of website projects, where all your code is uploaded to the server and compiled into DLLs on first access. This allows you to easily change your code without having to compile and publish the dlls.
Not a lot of people liked this new way of doing it, so MS created an update to allow for 2003 style WAPs in 2005. 2008 retains both options.
The File->New->Web site option is the only way to create a website application (or, at least it is in 2k8). The only way to create a WAP is to do File->New Project->Web->...
If you create a project, all cs files in your project will be compiled into one DLL. Instead, if you choose to create a website, all your app_code will be compiled and cached on the fly.

Resources