When trying to port the Calculator sample from the official Windows Bridge for iOS blog, I always get the following error after converting the project and trying to compile it:
could not acquire lock file for module 'UIKit' Calculator (Calculator\Calculator) W:\Source\Bridgetest\Calculator\Calculator\ViewController.h 9
I am using the latest version of the bridge 0.1 Preview (April 29, 2016).
Oh, and I am using Parallels for my Windows VM.
Any ideas?
I believe your question has been answered on Github, but I'll answer it here as well in case it's useful to anyone who finds this:
The problem here was the project and the WinObjC SDK were both located on a network share, which is how Windows identifies folders that Parallels shares between Windows and OS X. This causes problems for both vsimporter and Visual Studio.
Normally, vsimporter writes an absolute path to the WinObjC SDK in any imported projects. If you invoke vsimporter with the -relativepath option it will write a relative path instead. In either case, you also have the option to define WINOBJC_SDK_ROOT as an environment variable, which will take precedence over the path hard-coded in the project file.
If you would like to keep your code on a shared directory that is accessible from both OS X and Windows (so you can develop in Xcode and Visual Studio simultaneously from the same code base), you can do so. However, by default, Visual Studio will not register an app with the system if its files are on a network drive, so you'll have to change a few settings to get Visual Studio to build and run. Instructions for doing so can be found in our FAQ on Github.
Related
I had a very simple .Net Core console app that I was using to try experiment with docker/containers. I had heard that Visual Studio had great docker support and wanted to see if I could leverage it. After creating the .Net Core from the Visual Studio Templates, I right-clicked the Project to add "Docker Support...", then when prompted for Linux vs Windows, I selected Windows and then got the following error:
An error occurred while adding Docker file support to this project.
Value cannot be null.
Parameter name: netCoreVersion
I've tried various things and nothing seems to be working.
After much troubleshooting, this is what solved my problem. The TargetFramework I was using was not being recognized by Visual Studio. I wanted to test using a Windows only build because that is my primary use case.
Right-clicking the Project Properties, the TargetFramework was .NET 6.0 but the Target OS was Windows and NOT (None).
Those 2 settings combine the csproj file to have a setting of
<TargetFramework>net6.0-windows</TargetFramework>
instead of
<TargetFramework>net6.0</TargetFramework>
The Fix
Essentially get your TargetFramework to be net6.0. You can edit raw, or just select (None) as your Target OS. You can then add the Docker File, and then reset your project back to your Target OS.
I am trying to build a Windows driver for a piece of hardware I am using. The build notes seem dated as they specify using DDK for Win7. I have Windows kit version 10. Are these the same thing just later version? The instructions then state to open a DDK command window environment then use "build -ceZ" in the dir where the files are located. Does v10 have this console and if so where can I find it? Thanks
https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/wdk-and-visual-studio-build-environment
"The Windows Driver Kit (WDK) 8.1 and WDK 8 introduced a major change
to the environment that you use to build a driver. The WDK no longer
uses Build.exe. The WDK build environment for drivers uses MSBuild.exe
and is fully integrated with the Visual Studio development
environment. This means that source files, makefile.inc, makefile.new
and other related build files present in the previous version of the
WDK are no longer used. The WDK now enables you to create, edit,
build, test, and deploy a driver through Visual Studio. The purpose of
this document is to provide information to help users familiar with
previous WDKs in getting started with the WDK 8.1 and WDK 8."
If you want to build the driver as is then you will need to install the Windows 7.1 DDK and build it using its tools.
https://en.wikipedia.org/wiki/Windows_Driver_Kit
https://www.microsoft.com/en-gb/download/details.aspx?id=11800
You are allowed to install different versions of the DDK on the same machine.
You might find it tricky to install DDK 7.1 on Windows 10 though, try and use this to get around any problem install.
https://stackoverflow.com/questions/32091593/cannot-install-windows-sdk-7-1-on-windows-10#:~:text=If%20you%20continue%20with%20Setup,187668%20and%20then%20rerun%20Setup.
Then it's just a case of "choosing the 7.1 ddk environment (32bit or 64bit)" so that it's tools are accessible/used when "building" your driver.
Look in your startmenu at "StartMenu -> Windows Driver Kits -> WDK XXXX -> Build Environments" to find a command prompt to open.
If you can't/don't want to install the DDK 7.1 and a WDK8+ version of your driver project isn't available then it may be possible to convert the driver from using the older "makefile" into new msbuild way of building, but might be fiddly.
https://community.osr.com/discussion/289475/build-exe-to-msbuild-exe-migration-advice
"If you go into VS you should be able to create a WDK driver project.
It will give you a solution with (I think) one C file filled with
everything necessary to make a driver which does nothing. But, most
importantly, it will generate an XML file that MSBuild will accept.
The XML format is not documented. After you have this XML file you
should be able to figure out how to add your files to it by hand, but
you could move the existing driver files to the project using the GUI.
That may be easiest."
I'm going to create Q# application for the first time. I installed the "Microsoft Quantum Development Kit" and I have .not core 3.1.301 (the latest)
I use VS 2019 Community Edition.
In VS, I see the Q# Application when creating new solution but when I try to create , I get below error:
The project file cannot be opened by the project system, because it is
missing some critical imports or the referenced SDK cannot be found.
Detailed Information: The SDK resolver "NuGetSdkResolver" failed to
run. Unable to find fallback package folder
'C:\Microsoft\Xamarin\NuGet\'.
C:\Program Files\dotnet\sdk\3.1.301\Sdks\Microsoft.Quantum.Sdk\Sdk not
found. Check that a recent enough .NET Core SDK is installed and/or
increase the version specified in global.json.
I could not find any solution over the web.
The Quantum.SDK is not distributed with the extension, instead is downloaded the first time you try to build/create the Q# application.
Looks like Visual Studio is having problems downloading it using NuGet. I can think of two reasons:
1. You are not connected to the internet, so it can't connect to nuget.org to download the package
2. The error points to a missing "C:\Microsoft\Xamarin\NuGet\", I would suggest creating this folder.
I downloaded the WDK 8.1 and samples and using Win 7 Debug Win32 build configuration while building with Visual Studio 2013 for the "Scanner File System Minifilter Driver" sample solution. It successfully built the solution.
The build output 3 files of interest to me:
1) scanner.sys (the scanner file system minifilter driver)
2) scanuser.exe (the user-land executable that talked to the driver)
3) scanner.inf (driver installation file)
I copied the files over to my VMware virtual machine (XP 32-bit, in this case) and installed the driver using the .inf file which put the appropriate registry keys in the registry and put a copy of the .sys file into C:\Windows\System32\drivers. Then I ran "net start scanner" which started the driver successfully.
So far, this all worked fine. However ...
When I ran the scanuser.exe file it says it's not a valid Win32 application.
How do I go about testing this if I can't run the executable?
Are there build options I have to set in order for this to work?
Out of the box, Visual Studio 2013 will not produce executable that will run on Windows XP.
You must change the platform toolset:
In the Property Pages dialog box for the project, under Configuration Properties, General, set the Platform Toolset property to the desired Windows XP toolset. For example, choose Visual Studio 2012 – Windows XP (v110_xp) to create code that is binary compatible with the Microsoft Visual C++ 2012 Redistributable libraries.
In a similar project, I used the Visual Studio 2010 toolset.
I am an experienced (but retired) Windows software developer, with more years experience than I care to admit, developing in C++, C#, VB and Java. I therefore decided to have a crack at Android development. My development machine is a Windows 7 box. My IDE of choice would be Microsoft Visual Studio but, for now, I am happy doing hand editing and launching tools from the command line.
I started by downloading the Android SDK and various additional items it suggested. I then started working my way through the tutorial at developer.android.com/training/basics/firstapp. Android list targets gave me a couple of choices (Android 4.2.2 and Google APIs:17). I then did Android create project from the command line and that appeared to do its stuff, creating MyFirstApp in my development folder. I then ran Android avd and created an emulator. I also added the android SDK's tools and platform-tools to my path. So far so good.
I fell at the next hurdle. The tutorial told me to change to the root folder of my project and run ant debug. At this point, Windows reports:
'ant' is not recognized as an internal or external command,
operable program or batch file.
I've searched around for ant.exe without success. Did I miss installing something or did I miss a vital step in the set-up? Any advice for this very green newbie would be greatly appreciated.
There is no ant.exe. Only ant.bat. Ant is a Java build tool.
If it comes with the Android SDK, make sure its bin directory is in your PATH environment variable. Otherwise, download it (from [http://ant.apache.org][1]), and follow the installation instructions on the web site.
Normally, simply unzipping it, putting its bin directory in the PATH envieonment variable, and setting a JAVA_HOME environment variable that points to your preferred JDK directory is sufficient.