Compileing my blank console application with a setup Microsoft visual studio 2015 - visual-studio

so i have a console application that stitches a pdf into one big long tif however when i go to make a setup project it all seems to work fine until i move the installer to another commutator and run it it installs fine however whenever i run the application it gives an error
The program can't start because ucrtbassed.dll is missing from your computer
i have seen videos where when they add the primary output some msm file is added depending on the library's used in he code however no such file appears when i add my output in the application folder section in the main setup file
edit::
i feel that i cant explain this correctly and thus will upload it as and image this is the main application file inside of the setup project it looks like its only copying the source code when it should also include some dlls
application folder on the setup wizard

You are shipping a debug version of your app, and it is failing because it is asking for the debug version of the Universal CRT (that's why there is a "d" on the end, and it's actually ucrtbased.dll). In general the debug versions of these are available for debugging on developer's machines, not for client machines. So build a release version of your app and see what it does. If it fails looking for ucrtbase.dll, then clients can use this to install it:
https://www.microsoft.com/en-us/download/details.aspx?id=48234

Related

Unable to activate Windows Store app - The app didn´t start

I am trying to create a UWP app (for Desktop) in Visual Studio 2017 on Windows 10. Everything works fine, I added some UI elements and I can start the app without problems.
I want to incorporate OpenCV (3.4.9) into my app, which I built using CMake and Visual Studio 2017 (following the steps from https://medium.com/#rabbi.cse.sust.bd/how-to-build-opencv-for-universal-windows-platform-uwp-1a642ec09955)
I have checked the library path for each config (I built one for each x64/Debug, x64/Release, x86/Debug, x86/Release).
The problem starts when I start using OpenCV, eg by including "opencv2/opencv.hpp".
I can still build without errors, but when I try to run the app (Run without Debugging in VS), I get the error:
Unable to activate Windows Store app. The activation request failed with the error: The app didnt start
When running the .exe directly, nothing happens (I had to add some DLLs to the folder first).
I have tried the suggestions from the similar questions here on SO, but without luck.
Rebuilding or changing configuration doesn´t help.
I can start the app when including "opencv2/core.hpp", and do
cv::Mat img;
But if I write
cv::Mat img(200, 200, CV_8UC3);
The same error occurs. Writing
cv::Point pt(10, 10);
on the other hand works fine.
I am running out of ideas for things to try..
Ok, so I found the problem. Actually similar to what others with the same issue found:
Visual Studio was unable to find the DLL files for OpenCV. I did suspect that, so I added the bin folder to my path, and copied the DLL files into the project root as well as "ProjectRoot/x64/Release/ProjectName".
But apparently, the DLL files need to be in
"ProjectRoot/x64/Release/ProjectName/AppX"
for a x64 Release build.
If someone has any idea on why it can´t find them through the PATH or in the project root, please let me know.
I guess the reason is related to the fact that the binaries are dependent on the configuration?
Anyway, I can load an image through OpenCV in my UWP app now, so I´m happy.
Hope this saves someone a headache.

Btrieve 6.15 (Win 95) does not autoload in VB 6.0 IDE environment

I've recently bought a new tower and used third-party software to port across all my development tools (another story in itself), including VB 6.0, all my third-party tools, and Btrieve. The only problem I have with Btrieve is more an annoyance than anything. On this new tower, I have to remember to run my compiled application once before attempting to run it from inside the IDE or else it will not load, and subsequently return a corresponding error when it attempts to open the first file.
If anyone else has encountered this and knows how to fix it, I'd much appreciate it.
After checking this page on Wikipedia I realized that I needed to focus on two files: w32mkde.exe and wbtrv32.dll
By manually running the exe file, it would load the engine and my application would then run in the IDE, but I still had to manually start the exe. The desired and original behavior on my older machine was that running my program in the IDE would automatically launch the sever exe. From the Wiki page, I learned that it was wbtrv32.dll that was actually called by the program, which in turn would call the exe if needed.
I had recentl ported over my old machine to a new tower, and many of the ocx and dll files in \windows\syswow64 did not make it. There seems to be no pattern to which ones, but I had to re-register those as I found them. There must be some link there, because when I copied-over the W*.exe and W*.dll files from my production backup folder to the syswow64 folder, it suddenly worked again. Likely just a corrupt copy of the dll file. I believe the reason that the compiled version ran correctly is because those dll and exe files were installed to the application folder, and were apparently okay, but not being invoked when run from the IDE.
Hope this might help someone else some day.

Is it possible to deploy aspnet vnext to azure from a mac?

The kpm pack command needs the runtime for the server - is it possible to install windows runtimes on osx just for the pack and deploy?
Ok, it seems that in order to recognise that the deployment is an aspnet vNext project and to handle that as a 'ProjectK Web Application deployment', you have to make it look like it all came from Visual Studio (or at least that was the only way I managed to get it to work right now)...
I did this by taking an example one from somewhere else...
I took a simple single vnext web project .sln file and changed the project name and project GUID.
I took the .kproj Visual Studio project file and did the same.
There isn't much that needs to be changed - only the name of the project and GUID. It's nice that there isn't any file lists in there so I feel that this might end up as a once-only activity...
I did find that there are some project structure rules that seemed to make it break. You seem to have to have the sln file in the top level folder and a folder underneath for the web project. If there is ONLY a web project then this might seem overkill, but I tried collapsing everything up to the top with the sln file correctly pointing, but that didn't work.
The other thing that you need to make sure you have is a reference to "Microsoft.AspNet.Server.IIS" in the project.json dependencies. Without this, the AspNet.Loader.dll and bin folder don't get deployed.
Apart from that, I am now able to use Sublime Text (or whatever I want on osx), test using "k kestrel", checkin through git and it gets deployed automatically to an azure web site! yippee!
Actually this makes much more sense because it is letting the target decide upon the binaries it needs to satisfy the deployments. Next challenge might be to get it to pull 'my' libraries from a custom NuGet source to get my binary libraries in there and avoid uploading ALL of the source to the website!
Oh - and another tip: Quit kestrel with 'Enter' for a clean quit instead of Z which leaves the port listening but non-functional!

How do I Include a file in a release package that is not part of the project

I need to create a release / install package. There is a drop down box in VS that lets me create a release version for the project. So I hit the publish button and choose the CD option. Sure enough it publishes the a setup I need. I installed the application everything goes fine though I have no idea where on the target machine where the application ended up??? Trouble is my application has signed XML file that stores the public keys my application uses to enable features depending on what a customer is licensed to do. I would like the key file to be part of the package that is installed so I don't have to send it seperately. I have to send the license file but I was hoping to avoid confusion by only requiring the user to only have copy the license file to the local directory. Which brings up another question were is application installed I did a search and found nothing with my application name???? But thereis an icon onthe star menu and the applicaton seems to run just file
You probably deployed your application as a "ClickOnce" Application. It installs the program to an obfuscated folder in your users folder. On Windows 7 it winds up in something like "c:\users\username\AppData\Local\Apps\2.0\somefoldername\somefoldername". If you need more control of the installation, the free InstallSheild LE that comes free with VS2010 is not a bad choice. It will let you add additional files as well.

How can I properly publish my Windows desktop application in such a way that will ensure the end user has the right files needed to run it?

I have created a small desktop application using .NET 4 for generating an authentication string. It runs fine on my Windows 7 computer, however when I deployed it to our QA guy on his Vista machine, it gave him an error saying he needed to install .NET 4... FAIR ENOUGH. We installed .NET 4, however the next error said that "Microsoft.Web.Infrastructure.dll" was missing from the GAC. Crap. So I poked around a bit and found this:
I then set Publish Status of Microsoft.Web.Infrastructure.dll to Include and published again. This time it gave him an error about "System.Web.Mvc"! So I knew I was on to something. So I went and did this:
However, now when he runs it it just says it can't download files required to run the application, and will not specify what they are!
How can I properly publish my Windows desktop application in such a way that will ensure the end user has the right files needed to run it?
Note: I think Razor and MVC are included because this windows desktop app project is dependent on some other projects in this solution that are using MVC. (Basically this desktop app is using some of the Models.)
Edit: Here is the end result (README was added by me not VS)
As it turned out, the second screen shot view with everything set to Include was the proper way and worked fine while the first screen shot caused missing DLL errors during install. It really was just an FTP upload user error that had the installer looking for a folder that was not there, which is why the second version did not work the first time.
I think you should be looking in the Prerequisites dialog from the Publish tab of the project Properties window, not the Application Files dialog. Not sure if this is an SP1 feature or not (I have SP1).
Image reply from Ryan (question poster):

Resources