I am working on a project on my laptop, and am switching laptops. It is a Xamarin Android project with C#. It is source controlled onto visual studio online / devops using the Git option. When I clone my project onto my new laptop. My project is not building. Some projects aren't loading and some of my references have errors next to them.
I think to get it working requires some necessary steps. Please tell me if any of this should not be necessary.
(1) Open Visual Studio Installer and Modify in order to add Mobile Development and .Net so that Xamarin is installed.
(2) Tools > Android > Android SDK Manager > Checkmark necessary SDKs (aka android Lollipop, etc). (If these are failing, then right click on visual studio icon to "Run as Administrator" when initially opening.
This third step is whats bothering me:
(3) Clean Solution and Rebuild. And magically every dependency and every necessary anything is automatically installed/etc.. but not true.
Instead...
Some references in your projects will have a yellow triangle icon. Go to Tools > Nuget Package Manager and when you select any of the Installed projects, there will NOT be a checkmark next to ANY projects.. weird.. but when you go to Update, and click on any needing an update, the checkmark will be there. If you select all and update, some of your yellow triangles will go away, but the checkmarks won't appear in Installed when clicking on a project and seeing which projects it is installed in on the right.
Is there some button or command I am supposed to run that will grab all the necessary dependencies for me? Instead of me having to dig around and still have a non working solution?
Can you give some examples of the error messages you are getting? Usually Project Load - Restore Nuget Packages - Clean & Rebuild works for me.
NuGet will download the packages available in the package manager. However it may happen that some packages where not installed through the sources available in the package manager or that those packages are not available anymore.
In order for all the projects to build correctly I believe the following order is necessary: (As OP, I downloaded and tried to build the project before checking to make sure I had Xamarin and the necessary SDKs, and once those were installed, it wouldn't fix the project without deleting and recloning)
(1) Do NOT clone your project from github/devops yet. Delete it if you have.
(2) Install Xamarin. Open Visual Studio Installer and Modify in order to add Mobile Development and .Net so that Xamarin is installed.
(3) Install necessary SDKs for Android OS version. Tools > Android > Android SDK Manager > Checkmark necessary SDKs (aka android Lollipop, etc). (If these are failing, then right click on visual studio icon to "Run as Administrator" when initially opening.
(4) Clone project from github/devops, and clean/build. Should work automatically.
(An aside: I feel like step 3 should also be automatic? It should know which ones I'm targeting and auto install those? Maybe it does, I'm not sure.)
Related
I'm facing an annoying problem involving my installation of Visual Studio 2015 Enterprise. I just got into a cross platform mobile project and I have fetched the source code from version control. The solution consists of several mobile projects (Android, iOS) that work fine and a UWP project that refuses to load. It says on the solution explorer:
This project requires a Visual Studio update to load. Right click on the project and choose "Download Update"
After clicking "Download Update" I'm presented with this page: https://developer.microsoft.com/en-us/windows/downloads/sdk-archive .
I've tried downloading all three of the SDKs (I don't think it's an emulator issue so I haven't bothered download the emulator installers).
All three throw this error:
I've tried modifying my Visual Studio installation from the control panel but as you can see the installer claims all Windows SDKs are currently installed:
I've tried re-installing the SDKs. I've tried reinstalling Visual Studio 2 times, one of them involved a full uninstall by running
vs_enterprise.exe /uninstall /force
in a command prompt but to no avail.
Also when I try to create a fresh UWP Project the only platform I can target is the 10.0.240 build. I recall being able to target other versions in the past but the dropdown only contains this option now.
I finally solved it after quite a lot of research. I followed these steps:
Go to Control Panel > Programs & Features
Find Microsoft Visual Studio 2015, right click on it and select 'Change'
When the installer pops up select 'Modify'
Uncheck the whole 'Universal Windows Apps Development tools' section
Wait until the uninstallation is complete
Restart
Again go to Control Panel and find the SDK installers which apparently are not removed using the above method:
Uninstall them all
Restart
Visit this page: https://developer.microsoft.com/en-us/windows/downloads/sdk-archive and download all three SDKs
Start by installing version 10.0.26624 and work your way up
After you're done go to control panel find the Visual Studio Installation, right click, click 'Change' then after the wizard loads select 'Modify'
Make sure every option in the 'Universal Windows Apps Development Tools' section is checked, click Next
After the installation of the SDKs and tools is complete restart your computer
The error should be gone now
I ran into this error trying to add a Portable Class Library project to a solution. It occurred whether I asked it to target Windows Universal 10.0 or Windows 8.1.
The workaround I used is to ask it to also target ASP.NET Core 1.0, even though I wasn't using ASP.NET.
I also ran into this which took me a lot of time to solve. Actually YOU DON'T HAVE TO REINSTALL ANYTHING! If you are totally sure your Visual Studio is up to date, just follow these steps and it will solve your problems: https://stackoverflow.com/a/35733823/3322347
I'm using Visual Studio 2015 with Xamarin 4.1.2.18 and CocosSharp PCL 1.6.2.
When I try to access the Properties of the Android project by clicking on the "Properties" item in the Solution Explorer, this error pops up:
If I also right click on the project itself and select "Properties", it displays "This item does not support previewing".
It should be opening up to this page:
I have (supposedly) the latest build and Update 3. I have reinstalled it 3 times now.
Normal uninstaller. Reinstalled... nothing, still broken.
Uninstall again with cmd: /uninstall /force, use registry cleaners, manually uninstall components from Control Panel, manually delete folders. Reinstall... still broken.
Finally, I searched around and found this: Microsoft Visual Studio Uninstaller. After I, again, performed all the steps of 2, I used this tool and it found 52 additional things to clean up. I thought I finally had fixed it. Nope. The properties thing is still broken.
I have tried running as administrator. Nope.
I have deleted the ComponentModelCache in local AppData. Nope.
I have deleted the .suo file. Nope.
I know it has nothing to do with the project files because we have all the files synced with Git and my friend can view the properties page fine on his computer.
Does anybody know how I can fix this?
Is there some way to gather more information on the error?
Any Visual Studio error logs?
Also, on an semi-unrelated note:
When I try to build the Android project, I get errors saying that the $(TargetFrameworkVersion) for my references/dependencies is v4.2 and the $(TargetFrameworkVersion) of my project is v2.3. I checked my TargetFrameworkVersion property in the .csproj file and it's v6.0!
So, something is seriously wrong with this build of Visual Studio or something.
I've been considering just installing Visual Studio on a VM just to be sure.
Solution:
In the Android SDK manager, I had Android 4.0 (API 14) downloaded. Once I switched to Android 4.2.2 (API 17) everything started working.
I just gotta say, the error that it gave me is the most convoluted error message that I've ever received in the history of my programming career.
I have the same problem...pls help me...
I just installed the Xamarin and want to use vs2015 . When I create a new Blank App (Android) and I’m getting the following errors. How can I fix this? I reinstalled vs2015 and reinstalled Xamarin but I’m still getting the errors.
The referenced component ‘Mono.Android’ could not be found.
The referenced component ‘mscorlib’ could not be found.
The referenced component ‘System’ could not be found.
The referenced component ‘System.Core’ could not be found.
The referenced component ‘System.Xml’ could not be found.
The referenced component ‘System.Xml.Linq’ could not be found.
For me, I just ran into this trying to build a project pulled from TFS on a new VS 2015 Update 2 install. Not sure what exactly fixed it but this is what I did:
Download Android API 23 and 22 SDK from the SDK Manager and also updated all other items in SDK Manager (had to close and open it twice to get it totally up-to-date).
Nuget Restore packages (this did not fully fix it).
Followed these instructions where you go into all .csproj file in the solution and remove all mentions of nuget. Also do this in the solution file, but mine had nothing.
Use Package Console and run Update-Package -Reinstall (of if you know these package were building just fine before, I ran ``Update-Package -Reinstall -IgnoreDependencies`) and choose the project if you want.
Still had a couple errors from the Android Resource Designer file so did a build and everything was right in the world again.
For me it was a Mono.Android.dll version issue.
I removed the reference, and added a reference to the right version.
These errors most likely point to an installation with missing pieces (or a corrupt install). Try reinstalling Xamarin (again, yes) with admin privileges if you haven't done so already.
If you check your version information via "Help -> About Microsoft Visual Studio -> Copy Info [button]" and Xamarin isn't listed in the bottom, then your install didn't go through correctly.
Additionally, can you double check you have the Android SDK installed? Open up the start menu and type Android SDK Manager. Run it and make sure you've downloaded the build tools and one of the recent API levels.
For me i had to remove the pcl(portable class library) from the solution then added it back then the issue was resolved.
I recently got a new computer but I chose to install VS2015 after reinstalling Unity. I previously used monodevelop but thought I'd give VS a go (partially because it became the default program when opening scripts through Unity and I can't seem to change that).
I am however having a few problems due to the intellisense/auto complete function not working. I've read through a lot of answers on here but nothing seems to help.
My suggestion would be to rebuild your solution files.
From your projects root folder, copy Assets and Project Settings ONLY over to a new directory. From here open up one of your scenes, Unity will import assets and build the scene.
Once open, go to Edit -> Preferences -> External Tools and make sure that Visual Studio 2015 is selected as the External Script Editor and then go Assets -> Sync MonoDevelop Project (Ignore the name MonoDevelop!)
See if that works for you.
Failing that follow the guide here and note what version of Unity you are using as there are different steps for pre 5.2 Getting Started with Visual Studio Tools for Unity
And if that doesn't work, it's going to be a problem with your Visual Studio install. I've had this before even on a new install. So try a re-install as a last resort.
I am trying to update an application using the Install Shield project in visual studio 2012.
I have read tons of articles/stackoverflow questions about it, and every single one gives the same steps for updating an existing application:
Increment product version
Change Product Code
Build Setup
So I do exactly that. First I build my application, then I build the setup. I find the setup, and I run it. It installs the application as expected.
Then I make a minor change to my application (changing the background color for example), then I:
I build the application
Increment Product version from 1.00.0000 to 1.00.0001
Change the Product Code - I Click the {...} to automatically generate a new one
Make sure the Update Code is the same
Build the setup
Go to the same directory I found the setup in before, and run the setup. It indicates that it installs, but then when I run the program, it is the original program - and in my Control Panel > Programs, there is now 2 instances of the application. And in the install directory of the application, it is still the original files.
I have clicked the resequence RemoveExistingProducts, and still the same thing.
edit: I am just using the basic version of InstallShield that came with VS2012
Anyone have any ideas what I am doing wrong? I have absolutely no idea what I am doing wrong...
As stated within the Upgrade Paths section of InstallShield within VS2012:
If you have released earlier versions of your product and you want to ensure that end users are able to upgrade to the current version without manually installing the earlier version and then also installing the current version, use the Upgrade Paths view to indicate upgrade information.
So in order to upgrade any previous installations, you need to add your application's Upgrade Code to the 'Upgrade Paths'. You can do this from the Solution Explorer:
[InstallShield Setup Project] -> Organize Your Setup -> Upgrade Paths
From that tab, you will right-click on the 'Upgrade Paths' option on the left side of the center pane, and select 'New Upgrade Path...'. You will then be presented with an option to select an installer (.exe or .msi) for your project which will populate the Upgrade Code field. Make sure you set the Min and Max Version fields to specify which versions of your application that you'd like your new installer to upgrade. If you'd like the new installer to upgrade any installed version of your application, then simply set the 'Include Max Version' and 'Include Min Version' fields to no.
You should now be set to build your solution, and when running the new installer, you'll find that you will no longer run into the problems you've specified.