when I create a Jetpack Compose project on Android Studio it is created with compose_version = '1.1.0-beta01' which of course limits the features I can use.
I can't find a GUI way to create the project in a later LTS stable release, and changing the already existing project gives me tons of errors. Maybe I could create the project through the command line, but don't want to as JetBrains project creation scripts are great.
Thanks.
Related
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've followed these steps exactly and am getting the error below:
Select File > New > Project...
In the new project window, search for IoT Edge and choose the Azure IoT Edge (Windows amd64) project. Click Next.
In the configure your new project window, rename the project and solution to something descriptive like CSharpTutorialApp. Click Create to create the project.
In the Add Module window, configure your project with the following values:
Select Add to create the module.
I get this error regardless of the combination of solution folders, module names, and any other parameters that I enter during this workflow:
The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
The net result is that no changes are made to the solution -- no IoT Edge module project is created, no other files are altered.
I've tried running Visual Studio 2019 (16.4.3) as administrator, uninstalling and reinstalling the Azure IoT Edge Tools extension, all without success.
What can I do to troubleshoot this further?
Update 1: I've double-checked all documented prerequisites and still have this issue.
Visual Studio 2019 16.4.3, all prerequisite Visual Studio workloads installed
.NET Core workload installed the latest -- 3.1 LTS SDK -- only. Is there a hidden dependency on a specific older .NET Core 2.x SDK somewhere? Or is the documentation for VS Code on the subject out of date? (I'm using VS but was looking everywhere to see if I had missed anything)
Git for Windows installed (via Visual Studio Installer)
Docker Windows Desktop installed & switched to Windows containers
Azure IoT Edge Tools for VS 2019 installed (and uninstalled & reinstalled)
no UNC/FQ paths in the item or project template locations:
C:\Users\larsk\OneDrive\Documents\Visual Studio 2019\Templates\ProjectTemplates
C:\Users\larsk\OneDrive\Documents\Visual Studio 2019\Templates\ItemTemplates
multiple reboots
this is on a machine that just recently got the latest (1909) version of Win10 Pro reinstalled on it.
Update 2: Updating to Visual Studio 2019 16.4.4 did not help either.
The solution turned out to be running a Repair operation through the Visual Studio Installer.
I want to create an IPA file for both the release and debug for my app created in xamarin. I created the release IPA file with the following command in Bamboo:
-v build -t:Build "-c:Release|iPhone" CustomerApp.sln
This can be replicated on the terminal too by doing this:
/path-to-/mdtool -v build -t:Build "-c:Release|iPhone" CustomerApp.sln
But when I try to use the "-c:Debug|iPhone" this will not create the ipa file, when trying to use the terminal or Bamboo. I then tried different configurations like "-c:Release|iPhoneSimulator", "-c:Debug|iPhoneSimulator", "-c:Ad Hoc|iPhone" and "-c:Debug|iPhoneSimulator" but all of these will not create the IPA file. Why is this?
I know that the path to mdtool and the solution are fine because it works for the Release IPA but is it to do with the configuration in either Xamarin or Xcode?
If you are on the same Mac as the one you are running Xamarin Studio, it should mimic the provisioning profile setup you have in the IDE. If the build in Xamarin Studio builds with that combination with no drop down change on the main project, I would expect the mdtool to work. Note that now in Visual Studio 2017 for Mac it will be vstool under the /Applications/Visual Studio.app folder.
My build line looks like this:
/Applications/Visual\ Studio.app/Contents/MacOS/vstool --verbose build --f --target:Build --configuration:"Debug|iPhone" --buildfile:my.sln > $BuildResults
Update January 2019, I have found very little guidance on the web about what exactly vstool can do and how to use it. I believe it to be the Microsoft version of the mdtool, which is part of the Monodevelop project at Github (mono/monodevelop). The mdtool source code is under monodevelop/main/src/tools folder. It appears to be a runner for a variety of tools available in the Monodevelop / Visual Studio installation. Running
/Applications/Visual\ Studio.app/Contents/MacOS/vstool -q
will list out the available tools. There is also a man page as part of the Monodevelop build process, at monodevelop/main/man which provides a bit more enlightenment. I was shown how to use the specific command by someone who was very familiar with the project.
I am using an iball notebook and I don't have enough memory to install Visual Studio. I am having no problems using VS code and i am able to make and create executables of my console applications. I need to learn game development but everyone keeps saying that i need to install visual studio for it
However i did find a fourm on monogame on the topic and found that it is possible(At least on Linux) to use Monogame in VS code.
http://community.monogame.net/t/visual-studio-code-and-monogame/2371
Please Help me out.I want to know if it's really possible to compile and run a monogame app in windows.
Answer edited as Monogame released official dotnet project templates
I finally got it working.
I realized that all I needed was to create a monogame project (*.csproj) and Compile/Build it without Visual Studio. VS Code is just a feature-rich text editor and I would need other toolset for it.
MSBuild tool is used to Compile/Build monogame project and is available as a CLI. It is available without installing Visual Studio.
For C# project building, dotnet core is required. executing the script
dotnet new [Template]
creates a new Project. We need to add a template for monogame here.
As per the latest update by the Monogame Team, you can install the templates by executing
dotnet new --install "MonoGame.Templates.CSharp"
Use the script
dotnet new -h
to check out all the templates available.
Now, to generate the project, use the following
dotnet new mgwindows
On successful execution, this will generate [FolderName].csproj, Game1.cs, Program.cs and other files/folders of monogame project. Please not that this csproj is on .NET Framework (version 4.5 if I'm not wrong....) and therefore it might not work with dotnet run command. (If you're a bit stubborn, you might need to copy the Monogame installed folder(which contains, among many other files, Monogame.target file) in your dotnet installed folder.)
In other words, use msbuild to build and run the project
msbuild
If the program does not contain any compile time errors, the .exe file will be built successfully and you will get to see the the Output file path which you get to execute.
If you're working on Linux or have some other reason not to use MSBuild, you should not generate a mgwindows project. You can rather chose
dotnet new desktopgl
which works on dotnet core (i.e you can use dotnet run command to execute it).
I wrote this (Windows-only) solution in medium. It's a step-by-step of how to install and run dotnet with MonoGame in the terminal of VSCode.
You need to install:
.NET SDK 5.0
.NET Core SDK 3.1
.NET Runtime 5.0
You can run dotnet in your terminal and see if it's working.
Install MonoGame editor:
dotnet tool install --global dotnet-mgcb-editor
and
mgcb-editor --register
Install MonoGame Templates:
dotnet new --install MonoGame.Templates.CSharp
Create a new project in the chosen template:
dotnet new mgdesktopgl -o ProjectName
Enter in your project with cd ProjectName and add the MonoGame package to it:
dotnet add package MonoGame.Framework.DesktopGL --version 3.8.0.1641
And finally:
dotnet run Program.cs
There is absolutely no reason you cannot work with MonoGame from Visual Studio Code. It will not be an optimal setup since you'll lack debugging, and the setup will be difficult, but if you're okay with that then continue on.
You've already noted that you have no issues creating executable console applications. This is all you really need to be able to do. The key here is that you must build targeting .NET4+ or Mono. If you've followed tutorials that lead you to building .NET Core applications they will not work with MonoGame (at this time). If you are building .NET Core, spend some time looking into how to build Desktop CLR applications using MSBuild or Mono. If you need more information I can expand upon this. You'll also need to be sure you know how to reference other .NET assemblies from your console applications. Please do some research on how to do this before moving on.
For Windows you have the option of targeting DesktopGL (OpenGL) or WindowsDX (DirectX) versions of MonoGame. I'm partial to the DirectX versions myself. You'll need 2 things to get up and running: 1. the MonoGame assemblies, and 2. the MonoGame Pipeline Tool (this is used to compile your content into .XNB files so they may be imported into your game).
To get at MonoGame's assemblies and tools the easiest way I can think of is to install Visual Studio Community Edition and then download and install MonoGame for Visual Studio. This will bring all the tools to you. You'd then need to look at "C:\Program Files (x86)\MonoGame\v3.0\Assemblies" for the appropriate assemblies and "C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools" for the MonoGame Pipeline Tool.
If Visual Studio will not let you install because your machines doesn't meet the requirements then you are not out of luck. The assemblies can be pulled in via nuget. Download the latest nuget.exe here: https://dist.nuget.org/index.html and then run: nuget.exe install MonoGame.Framework.WindowsDX or nuget.exe install MonoGame.Framework.DesktopGL. This will create a directory containing a lib folder that contains a net40 folder which contains the .DLL files you need. For WindowsDX I think you'll also need the DirectX runtime https://www.microsoft.com/en-us/download/details.aspx?id=34429. For OpenGL I think you'll need OpenAL (for audio) https://www.openal.org/downloads/.
Once you have the assemblies you'll need to reference them when you build your code. As you've said you're already familiar with creating and running console applications I'll assume you know how to do this. Just reference every managed .DLL you downloaded with Nuget or pulled from the Assemblies folder from the install.
To test things out, drop this into a .cs file, reference the MonoGame assemblies in your build, build it as you would a console application, and execute:
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
public class Game1 : Game
{
GraphicsDeviceManager graphics;
public Game1()
{
graphics = new GraphicsDeviceManager(this);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
}
[STAThread]
static void Main()
{
using (var game = new Game1())
game.Run();
}
}
You should get a window with a cornflower blue background. If you don't, then you're not building or referencing things right, or you're missing a dependency.
The trick now is getting your hands on the Pipeline Tool, and MGCB.exe. If you were able to install MonoGame for Visual Studio, great!, these files are in the folder I references above. If not, for whatever reason the MonoGame project doesn't distribute stand alone versions of these, only with the installer. I've taken the contents of what you need and plopped it into a dummy release on GitHub here: https://github.com/srakowski/derp/releases/tag/MG. Download the Pipeline.zip file, extract it, and you should have what you need.
Create an empty Content.mgcb file and open it with Pipeline.exe. You should be able to add and build content files. You'll need to copy these files into the same directory where your .exe lives. Commonly, these are put into a Content folder, and Content.RootDirectory = "Content"; is added to the Game's constructor.
Once you get all this working you should be free and clear to create games as your heart desires. Please let me know if you have troubles and we'll work things out.
I've tried Monogame on Visual Studio and own a Windows PC. So I can safely confirm that Monogame does work on Windows. To answer your question.
However, if you want to try it without Visual Studio, then I don't think you can really get far. as there are several build in tools needed to make a decent one. And you cannot debug it either. You're working really limited if you cannot use Visual Studio.
Try to clean up your PC to make some free space. Visual Studio would really be a better choice to work with.
I am trying to build a test MVC4 project on OS X 10.7.4 using Mono 2.10.9. I created a new empty MVC4 web application in Visual Studio used git to transfer the source code from Windows to Mac OS X. I then ran xbuild for .nuget package restore, but when I build in monodevelop I get a weird error:
/Users/tamasnagy/Developer/Spellbound/Spellbound/Spellbound.csproj: Error: /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/xbuild/Microsoft/VisualStudio/v10.0/WebApplications/Microsoft.WebApplication.targets: Project file could not be imported, it was being imported by /Users/tamasnagy/Developer/Spellbound/Spellbound/Spellbound.csproj: Imported project: "/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/xbuild/Microsoft/VisualStudio/v10.0/WebApplications/Microsoft.WebApplication.targets" does not exist. (Spellbound)
What could this mean? This also happens when I simply create a new MVC project in MonoDevelop and press build. Any ideas?
Create a symlink:
cd /usr/lib/mono/xbuild/Microsoft/VisualStudio/v9.0
ln -s v9.0 v10.0
I have the same exact ubuntu 12.04 distro on two different computers and could not figure out why mono would compile on one computer and not the other. But oh well, symlink solved the problem.
Change your csproj file to import v9.0, as so...
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
Mono's MSBuild implementation (xbuild) does not have an implementation of the targets for ASP.NET projects.
You might be able to build in MonoDevelop. Make sure you have the experimental xbuild integration turned off in MonoDevelop preferences.
I know this is an old question, but it came up when searching for how to use WebApplications.targets on OSX, so it's still worth answering. With the current version of Mono (5.x), Webapplication.targets is included, so now all you have to do, is to set the VSToolsPath, and everything should just work.
If you are using standard bash shell, the .profile file is the place to put it:
export VSToolsPath=/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild/Microsoft/VisualStudio/v15.0/