Run c# visual studio project in windows, created in ubuntu - windows

I've got a problem with Visual Studio console application created in Ubuntu 15.04. When I try to run c# program in Visual Studio in Windows 10 I get an error "visual project does not contail any commands in project.json and cannot be start". How to fix that?
I have only json file but I don't have any sln and csproj.

The easiest solution: create new, empty console app and paste content (.cs) files from linux repo to it. Build and compile.
Remember to resolve conflicts which may occur (libs used in linux environment may be problematic in windows).

Related

Visual Studio Exe App compilation path change

I just want to change the exe file Visual Studio compilation path change
I am doing it like this now. i created a bat file that copied file. I have added visual studio build events. I wonder if there is an easier way.
meanwhile the exe file is being copied to the network drive
I had this problem in a different context (Elixir/Phoenix, Rust), but the root cause was the same: cl.exe could not be found during compilation.
My setup was:
Windows 10, x64
Visual Studio Community 2017 already installed, but only for C# development
For some reason the solution with installing the Visual C++ Build Tools (as #cozzamara suggested) did not work. Stops during installation with some obscure error message. Guess it did not liked my existing Visual Studio installation.
This is how I solved it:
Start up the Visual Studio Installer
Check the Desktop development with C++ (screenshots here)
Execute following command before compiling:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat
From this on the command cl.exe works. Alternatively (and more conveniently for development) start the application 'Developer Command Prompt for VS 2017' or 'x64 Native Tools Command Prompt VS 2017'.
Share
I solved the problem by writing code like this in the Post build field, I just ensured that the exe was copied to the field I wanted
COPY $(TargetPath) "\x.x.x.x\ortak\yakup\TestApp.exe"
pause
$(TargetPath) = It gives the location where the exe exited, along with the exe name
"C:\yakup\project\TestApp.exe" like

mfc120d.dll is missing after opening my project exe

I have a MFC vc++ project and I have exe file for this project using Visual Studio 2013. When I open the project exe it is working fine on my development machine.
But when I open this exe in my customer's machine, I'm getting this error message:
The program can't start because mfc120d.dll is missing from your computer. Try reinstalling the program to fix this problem
I noticed that my project exe file is working if the system has Visual Studio installed. I also installed "Visual C++ Redistributable Packages for Visual Studio 2013", but even then I'm getting same error. Please suggest a solution.
This is because you deployed a debug version of your app. If this was intentional (to be able to debug remotely? ) you can find and deploy the mfc120d.dll from your VS2013 installation directory.
Otherwise just build the Release configuration and you should be fine.

How to generate vcvarsall.bat

My visual Studio 2015 installed without vcvarsall.bat.
This is not about how to find this file and I am also not a python developer.
MSDN states at the bottom of this page:
The vcvarsall.bat file can vary from computer to computer. Do not
replace a missing or damaged vcvarsall.bat file by using a file from
another computer. Rerun Visual Studio Setup to replace the missing
file.
I am running the installation through our local IT department so I only get a fixed version of the setup. It looks like this setup does not install the batch file.
I wonder what other means of generating this "file" (actually it is several files and a folder structure) there are - how does the visual studio setup generate this file and is that generation possible without running the whole setup?
You have some option to "install" vcvarsall.bat.
The obvious to rerun VS setup and add c++ features (maybe your IT dep is kind enough and...)
Install visual c++ build tools
Install windows sdk (select c++ related components)

Opening visual studio solution from a linux drive

I just upgraded from Win7 to Win10 and I noticed the following change, that I don't explain for now.
I used to checkout my source code on in a mounted linux drive (\myremote\myaccount\ as X:)
before I was able to open visual studio 2008 solution (.sln file) and build but since the upgrade to Win10, devenv fails when I double click on a sln, saying that:
The following files were specified on the command line:
X:\blahblah\myproject\myproject.sln
These files could not be found and will not be loaded
but I can open and save that sln file using a text editor.
Note that my devenv run as Administrator.
Any idea ?

MSBuild Console - How to Add Additional Include Directory?

I have setup a new server machine. I setup windows sdk, .net framework sdk, and checkout my visual studio from svn. I would like to build my application using msbuild but it keeps asking me where the "windowsx.h" file is. I do not want to setup any visual studio ide. How can I make msbuild see windows sdk include folder using console?
With a normal install of Visual Studio you get a shortcut to a Visual Studio prompt. This sets all environment variables so you can use the compiler (and other tools) from the command line. First you can try to run msbuild from such a prompt. If that works add the necessary folders to the msbuild settings.

Resources