New VS Project Creation to interface with SOAF service - c#

I don't create VS projects normally; it's been mostly changes to existing ones so far, and I'm fairly new to VS, and I'm the only real software engineer on my team. I've done project creation for tutorials, but this is new and doesn't follow a tutorial that I see.
I'm trying to create a VS project that is like another one, which shows it's Target framework is .net framework 4.5, console application. Building it is creating an .exe file and .pdb file in the bin/debug dir.
Then there's my new project that I need to create. When I created a new VS project, trying to follow the same setup, it created a .net core 3.1 framework (didn't show .net framework 4.5 to choose, and it wasn't showing in project application setup to choose .net framework 4.5), console application, and building it creates a dll with the project name, but also dll's for win32.registry, system.data.sqlclient, system.diagnostics.eventlog, project.exe, project.pdb, runtimeconfig.dev.json, etc, and it's all in bin/debug/netcoreapp3.1. The plan is to run the .exe with a batch file like the other one, which is why I chose that one to copy the project style.
The solution architect said we need a SOAF service. He said:
• The Parent program's Web Services Interface - SOA Fabric-enabled (SOAF) web services in the Parent program are Windows Communication Foundation (WCF) web services with support for enhanced security and other features provided through SOAF.
• AddTask Service – A SOAF service, AddTask operation receives task information from an external task-generating system and adds the task to the parent program for a specific user or a queue. This operation adds a task to either a queue or to a specific user.
My questions are:
Does it matter that I have that bin/debug/netcoreapp3.1 folder with all of those dlls' and exe, etc, whereas the old format had just bin/debug/exe and pdb in it? My plan is to copy the .exe file and none of the .dll's to run for the batch.
How do I create a SOAF service, and is that the right kind of project for that? I don't turn up anything in a search for SOAF service visual studio.
I'm sorry if I'm a little unsure of this, but it's pretty new to me. This uses Visual Studio 2019.
Here is the header info in the Code Sample that uses the TaskService (note that we will also be passing client credentials in ws-security token):
using System;
using System.ServiceModel;
using Tests.Integration.TaskServiceReference;
using Trizetto.CareAdvance.Service.Operation.Tests.Integration;
namespace Tests.Integration.TaskService
{
internal class Client : ISOAFServicesClient
{

I installed framework 4.8 through VS under target frameworks. It wasn't selectable there, under project properties as I would expect.
I wound up having to re-create my VS project. For template, I found framework 4.8 through searching templates in project creation using framework c# console search params. I then copied my files over to the new project folder, and added them as existing items through the solution tool.
I'm still not entirely sure about the SOAF part.

Related

Installing ASP .NET Core service to IIS using Visual Studio Installer Projects

I have a ASP .NET Core 3.1 application which is hosted as a windows service using IHostBuilder.UseWindowsService call. I am preparing a setup project using Visual Studio Installer Projects Extensions. The project is created as Web Setup project type so that the installer dialog already presents to the user selection of web page and application pool on IIS.
The problem I'm facing is that the assemblies are successfully installed in given folder on IIS, but the ApplicationService.deps.json is not installed. Without this file the application does not start successfully. As far as I have checked the file is created as part of the build in bin\x64\Release\netcoreapp3.1\ but is apparently not included by the Setup project.
I've played around also with Setup project's property PublishProfilePath by specify the profile that I generated when manually trying to publish from Visual Studio to IIS:
However, this produces even stranger results. The application is deployed to the IIS already when I build the Setup project! Then when check the newly created msi, it's size is really small and in fact does not install anything (completes successfully though).
Any help would be highly appreciated.
I managed to solve the problem, though I'm not sure if that's the optimal solution. In the setup project, you can include as part of the output also individual files. If I add the ApplicationService.deps.json it is marked with a relative path in the setup project itself. This means that once setup project is being build, the ApplicationService project is anyway built first as it's the primary output of setup project. At that point `ApplicationService.deps.json' is present in the Release folder. Then as msi is being created it's included as part of the output.
It works, but I would prefer that the setup project would include that file automatically.

How to create a installer to my C# console application(Checkers Game) made in Visual Studio 2019?

Using Wizard Setup extension
First I tried to create the installer using primary output option, the result is a application folder without file.exe(only dll) and the detected dependencies is empty (but .Net Core is required)
Second I published my Console app and manually added the files to the installer, it solved the application folder without .exe issue, but the detected dependencies still empty (and .Net Core still required).
I already tried to run without dependencies in another machines, but doesn't work
I want to know:
Why it's not detecting dependencies
Or how to manualy put this dependency and how to know what .Net Core version is required
Here is my code for reference(ignore Dama_Console): https://github.com/lincasaires/Practicing-C-

Creating Exe/MSI for C# Windows Forms using Visual Studio 2017 Setup Project

I'm trying to create exe/msi for my solution
it contains the following Projects
ActiveDirectoryEngine: library used to implement AD operations
ADService: windows service - performs the work in the background
CryptographyEngine: library used to encrypt/decrypt data
TerranovaActiveDirectoryHost: Dashboars/win form to manage/check the service's status
SyncToolSetup: the setup project "it only targets TerranovaActiveDirectoryHost"
Here is the contents of the Setup project:
I tried the same steps for different Solution, with ONLY one windows forms application, and it worked fine, but it looks that it doesn't work when I have more than one referenced projects.
The install and Uninstall options are not enabled
Update:
all the previous projects are referenced in the Win forms project, so am I targeting the right one when creating the exe/msi?
The only project with the Install option is the setup project. Other projects in the solution do not have install option just because there is a setup project as part of the solution.
References in a non-setup project (such as a C# build) are not automatically included in a setup project. References used to build code are not necessarily things that need installing on the target system. The setup will try to help with dependencies, but it's unreliable, and only a guide. For example, your Application Folder view contains some files that are part of the .NET Framework, and you definitely don't install them because they are installed as part of the standard .NET framework install.
The setup project must be told what needs to be installed on the target system. There are generally two ways of doing this:
Selecting project output as input to the setup project. This can be rather indeterminate because it's not always obvious what files are included, or what to do if the files need installing to different locations.
Add the files that you know you need one at a time by adding them in the File System view of the directory they need installing into. Typically, executables go into the Application Folder (defaults to Program Files..), data files to User's Application Data, shared files to Common Files folder, some assemblies to the GAC and so on.

MVC core MSI builder, how to create installer?

I've written an MVC core app. The next step is to wrap it in an MSI and distribute it to clients. The problem is this: I can't seem to find any built in way capture all the content files and dll's automatically and wrap them in an MSI. I've tried so far windows installer and wix (heat, to be precise) and both of them doesn't seem to have a built in way to work with .net core. Did Microsoft just decided it's not important enough or am I missing something important? I could try to put all the output and all the dependencies, file by file, but that would be hell to maintain, with the new Nuget approach there are many many dll's required for a project, together with all the content it becomes enormous. Any help would be appreciated
I'm still adjusting to this "modern" world and part of me wonders why you'd want to package a .NET core app as an MSI. I'd think you'd be running it in a docker container or windows server app (appx) in the "cloud" or on nano server which doesn't even support MSI. For actual windows servers I'd assume regular old .NET. (Which I still fondly love.)
That said, I have an open source program called IsWiX (CodePlex) and have a very simple pattern for creating ASP.NET website installers (see video at: https://www.youtube.com/watch?v=pgDf1kv8a-4) and I'd be willing to work with you to come up with a similiar story for asp.net-core mvc apps.
From what I read, .net core apps also have msbuild publish profile support. That is what I use to create the model from which I author my installers. From there I just drag drop my files into IsWiX and let it author all the XML for me.
FWIW website installers have always had a lot of files. Even before nuget and npm a website developer might add a few thousand files to their project just by adding say Infragistics. I once worked on an installer with over 300,000 files. Yikes! I always wished we had a way of just creating an uncompresssed archive of this stuff and IIS could see if as a directory but to my knowledge that never happened.
The MSI world is a declarative world where we need to explicitly list each of those files. Web developers live in a world where they just say "publish" and don't care about those details. That is the gap that I try to bridge with IsWiX.

Deploy a WPF application with .NET 3/3.5 in a single executable

I have developed a WPF application and the customer is planning to deploy the application on DVDs.
My application is really simple and doesn't require any setup process, but I need to assure that if the client doesn't have .NET 3 installed that it will be installed locally (from the DVD) before starting the WPF application.
So, what's the easiest was to add the .NET 3/3.5 package locally on my DVD and assure it'll be installed before running my application? Remeber that my application will be a standalone application.
when you use the publish option...
The Project Properties has a place to specify the dependancies that will need to be downloaded
then you simply check the boxes
there are other more complex ways to go abaout this but for .net 3.5 you don't have to go far
I would suggest using Visual Studio Setup Project for creating a setup package which would check for prerequisites and provide fundamental features like file system, registries, scripting. It is very easy to get started with. Take a look here for a brief walkthrough.

Categories