New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xamarin.Android.Build.Tasks] designer needs full paths in libraryprojectimports.cache #2607

Merged
merged 1 commit into from Jan 11, 2019

Conversation

Projects
None yet
3 participants
@jonathanpeppers
Copy link
Contributor

jonathanpeppers commented Jan 11, 2019

The Xamarin.Android designer uses the paths found in
libraryprojectimports.cache, and recently was coming up with some
odd paths in test failures:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Common7\IDE\obj\Debug\90\lp\2\jl\res

Looking at the contents of libraryprojectimports.cache, some of the
paths were no longer full paths:

<Paths>
...
  <ResolvedResourceDirectories>
    <ResolvedResourceDirectory>obj\Debug\81\lp\6\jl\res</ResolvedResourceDirectory>
    <ResolvedResourceDirectory>obj\Debug\81\lp\9\jl\res</ResolvedResourceDirectory>
    <ResolvedResourceDirectory>obj\Debug\81\lp\11\jl\res</ResolvedResourceDirectory>
    <ResolvedResourceDirectory>obj\Debug\81\lp\12\jl\res</ResolvedResourceDirectory>
    <ResolvedResourceDirectory>obj\Debug\81\lp\13\jl\res</ResolvedResourceDirectory>
    <ResolvedResourceDirectory>obj\Debug\81\lp\14\jl\res</ResolvedResourceDirectory>
  </ResolvedResourceDirectories>
...
</Paths>

In 02c07ed, we inadvertently lost the full paths when LINQ was
removed. Things worked fine during regular builds, but not within the
context of the designer.

Changes:

  • Anywhere we add to resolvedResourceDirectories, should use
    Path.GetFullPath
  • Same with resolvedAssetDirectories
  • Fixed a place where an assemblyDir variable made more sense to be
    named assetsDir.
[Xamarin.Android.Build.Tasks] designer needs full paths in librarypro…
…jectimports.cache

The Xamarin.Android designer uses the paths found in
`libraryprojectimports.cache`, and recently was coming up with some
odd paths in test failures:

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Common7\IDE\obj\Debug\90\lp\2\jl\res

Looking at the contents of `libraryprojectimports.cache`, some of the
paths were no longer full paths:

    <Paths>
    ...
      <ResolvedResourceDirectories>
        <ResolvedResourceDirectory>obj\Debug\81\lp\6\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\9\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\11\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\12\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\13\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\14\jl\res</ResolvedResourceDirectory>
      </ResolvedResourceDirectories>
    ...
    </Paths>

In 02c07ed, we inadvertently lost the full paths when LINQ was
removed. Things worked fine during regular builds, but not within the
context of the designer.

Changes:

- Anywhere we add to `resolvedResourceDirectories`, should use
  `Path.GetFullPath`
- Same with `resolvedAssetDirectories`
- Fixed a place where an `assemblyDir` variable made more sense to be
  named `assetsDir`.

@jonathanpeppers jonathanpeppers requested a review from dellis1972 Jan 11, 2019

@jonathanpeppers

This comment has been minimized.

Copy link
Contributor

jonathanpeppers commented Jan 11, 2019

/cc @garuma

@garuma

This comment has been minimized.

Copy link
Member

garuma commented Jan 11, 2019

❤️

Once this is approved and merged, we will need it in d16-0 as well so that we are not broken in P2. Thanks for the quick turnaround!

@dellis1972 dellis1972 merged commit fdbee27 into xamarin:master Jan 11, 2019

4 checks passed

Ubuntu PR Build Build finished. No test results found.
Details
license/cla All CLA requirements met.
Details
macOS PR Debug Build Build finished. 86770 tests run, 37 skipped, 0 failed.
Details
macOS PR Release Build Build finished. 172335 tests run, 39 skipped, 0 failed.
Details

jonpryor added a commit that referenced this pull request Jan 14, 2019

[Xamarin.Android.Build.Tasks] designer needs full paths in librarypro…
…jectimports.cache (#2607)

The Xamarin.Android designer uses the paths found in
`libraryprojectimports.cache`, and recently was coming up with some
odd paths in test failures:

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Common7\IDE\obj\Debug\90\lp\2\jl\res

Looking at the contents of `libraryprojectimports.cache`, some of the
paths were no longer full paths:

    <Paths>
    ...
      <ResolvedResourceDirectories>
        <ResolvedResourceDirectory>obj\Debug\81\lp\6\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\9\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\11\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\12\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\13\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\14\jl\res</ResolvedResourceDirectory>
      </ResolvedResourceDirectories>
    ...
    </Paths>

In 02c07ed, we inadvertently lost the full paths when LINQ was
removed. Things worked fine during regular builds, but not within the
context of the designer.

Changes:

- Anywhere we add to `resolvedResourceDirectories`, should use
  `Path.GetFullPath`
- Same with `resolvedAssetDirectories`
- Fixed a place where an `assemblyDir` variable made more sense to be
  named `assetsDir`.

jonpryor added a commit that referenced this pull request Jan 14, 2019

[Xamarin.Android.Build.Tasks] designer needs full paths in librarypro…
…jectimports.cache (#2607)

The Xamarin.Android designer uses the paths found in
`libraryprojectimports.cache`, and recently was coming up with some
odd paths in test failures:

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Common7\IDE\obj\Debug\90\lp\2\jl\res

Looking at the contents of `libraryprojectimports.cache`, some of the
paths were no longer full paths:

    <Paths>
    ...
      <ResolvedResourceDirectories>
        <ResolvedResourceDirectory>obj\Debug\81\lp\6\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\9\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\11\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\12\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\13\jl\res</ResolvedResourceDirectory>
        <ResolvedResourceDirectory>obj\Debug\81\lp\14\jl\res</ResolvedResourceDirectory>
      </ResolvedResourceDirectories>
    ...
    </Paths>

In 02c07ed, we inadvertently lost the full paths when LINQ was
removed. Things worked fine during regular builds, but not within the
context of the designer.

Changes:

- Anywhere we add to `resolvedResourceDirectories`, should use
  `Path.GetFullPath`
- Same with `resolvedAssetDirectories`
- Fixed a place where an `assemblyDir` variable made more sense to be
  named `assetsDir`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment