Bug 33994 - Clean -> Build process broken for Shared Projects
Summary: Clean -> Build process broken for Shared Projects
Status: RESOLVED ANSWERED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 5.10 (C6SR3)
Hardware: PC Mac OS
: High normal
Target Milestone: 5.10 (C6)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-09-15 21:59 UTC by Cody Beyer (MSFT)
Modified: 2015-10-05 14:43 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Cody Beyer (MSFT) 2015-09-15 21:59:44 UTC
### Description

When working within a solution which contains a shared project and platform projects (iOS/Android), performing a clean -> build upon the shared project breaks the build for the platform projects

### Steps to reproduce

1. Create a shared cross platform project (not PCL)
2. Clean the shared project
3. Build the shared project
4. Build/Run a Platform project

### Expected Results

The project should run at step 4

### Actual Results

The project fails with:

/Library/Frameworks/Mono.framework/Versions/4.0.4/lib/mono/4.5/Microsoft.Common.targets:
Error: Cannot copy as the source file doesn't exist.

### Workaround 

1. Make whatever code change to Common
2. Clean the project
3. Close the project
4. Delete the Common bin files
5. Open the project
6. Build Common
7. Delete the reference to the Common DLL in iOS/Android
8. Re-add the reference to the Common DLL in iOS/Android
9. Close the project
10. Open the project
11. Run iOS/Android

### Versions

=== Xamarin Studio ===

Version 5.9.7 (build 2)
Installation UUID: b46033be-d5c0-46eb-aef7-fc4df7011580
Runtime:
	Mono 4.0.4 ((detached/cb6d6b2)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400040002

=== Xamarin.Android ===

Version: 5.1.6.7 (Business Edition)
Android SDK: /Users/codybeyer/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 7.0 (8223)
Build 7A218

=== Xamarin.iOS ===

Version: 9.0.1.9 (Business Edition)
Hash: da2cabb
Branch: master
Build date: 2015-09-14 23:31:50-0400

=== Xamarin.Mac ===

Version: 2.0.2.111 (Business Edition)

=== Build Information ===

Release ID: 509070002
Git revision: d299092c501fa306f51212336ec8529365a328ae
Build date: 2015-09-14 13:54:17-04
Xamarin addins: ee69b3db9db1256ef2397b6f22f7974816c96870

=== Operating System ===

Mac OS X 10.10.5
Darwin Codys-MacBook-Pro.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
Comment 1 Lluis Sanchez 2015-09-16 06:53:19 UTC
You should not be able to directly build or clean a shared project, the build command is disabled for this kind of project. How are you doing it? a screencast would be helpful.
Comment 2 Cody Beyer (MSFT) 2015-10-05 14:43:43 UTC
comment 1 answers