Giter VIP home page Giter VIP logo

Comments (5)

Basewq avatar Basewq commented on May 27, 2024 1

The "CopyLocal" bug is a engine/build bug.

This targets file (Stride.Core.PostSettings.Dependencies.targets) was changed from "CopyLocal" to "ReferencePath.CopyLocal"

<Target Name="_StrideListDepsFiles" DependsOnTargets="ResolveAssemblyReferences">
<ItemGroup>
<_StrideDepsFile Include="@(ReferencePath->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="'%(ReferencePath.CopyLocal)' != 'false' And Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<_StrideDepsFile Include="@(ReferenceDependencyPaths->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="'%(ReferenceDependencyPaths.CopyLocal)' != 'false' And Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<None Include="@(_StrideDepsFile)" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Target>

However, my understanding is this targets file (Stride.Core.targets) did not sync those changes

<Target Name="_StrideListDepsFiles" DependsOnTargets="$(_StrideListDepsFilesDependsOn)">
<ItemGroup>
<_StrideDepsFile Include="@(ReferencePath->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="'%(CopyLocal)' != 'false' And Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<_StrideDepsFile Include="@(ReferenceDependencyPaths->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="'%(CopyLocal)' != 'false' And Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<_StrideDepsFile Include="@(RuntimeCopyLocalItems->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<_StrideDepsFile Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<!-- Android -->
<_StrideDepsFile Include="@(_ReferencesFromNuGetPackages->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<None Include="@(_StrideDepsFile)" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Target>

As per the note directly above, it says "Important: Please keep in sync with Stride.Core.PostSettings.Dependencies.Targets"
however I don't know the full extent of what needs to be sync'd (eg. just change CopyLocal to ReferencePath.CopyLocal & ReferenceDependencyPaths.CopyLocal or maybe copy-paste all six lines?)


For an immediate workaround:

Double clicking on those errors will open the targets file from the nuget package, then change the first %(CopyLocal) to %(ReferencePath.CopyLocal) and the second to %(ReferenceDependencyPaths.CopyLocal)
ie. the changes should look like from

<_StrideDepsFile Include="@(ReferencePath->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="'%(CopyLocal)' != 'false' And Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<_StrideDepsFile Include="@(ReferenceDependencyPaths->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="'%(CopyLocal)' != 'false' And Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>

to

<_StrideDepsFile Include="@(ReferencePath->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="'%(ReferencePath.CopyLocal)' != 'false' And Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>
<_StrideDepsFile Include="@(ReferenceDependencyPaths->'%(RootDir)%(Directory)%(Filename).ssdeps')" Condition="'%(ReferenceDependencyPaths.CopyLocal)' != 'false' And Exists('%(RootDir)%(Directory)%(Filename).ssdeps')"/>

from stride.

Basewq avatar Basewq commented on May 27, 2024 1

Nice work @Basewq! Are you working on a PR for this? If not I can create one.

I'm not, feel free to make one.

from stride.

Doprez avatar Doprez commented on May 27, 2024

My experience with Stride has been purely Desktop but I did get a working version running in Android with just Stride a while ago.
Creating a Android template project provides the following csproj file, maybe it will provide some usefull info?

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net8.0-android</TargetFramework>
    <SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
    <OutputType>Exe</OutputType>
    <RootNamespace>MyGame3</RootNamespace>

    <OutputPath>..\Bin\Android\$(Configuration)\</OutputPath>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>

    <ApplicationId>MyGame3</ApplicationId>
    <ApplicationVersion>1</ApplicationVersion>
    <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
	  
    <!-- Force msbuild to check to rebuild this assembly instead of letting VS IDE guess -->
    <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>

    <!-- Use AssemblyName rather than RootNamespace for Resource class otherwise it might clash between some assemblies (i.e. MyGame and MyGame.Android) -->
    <AndroidResgenNamespace>$(AssemblyName)</AndroidResgenNamespace>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\MyGame3\MyGame3.csproj" />
  </ItemGroup>

</Project>

@VaclavElias would you have any thoughts on why just adding the toolkit would introduce this dependancy? I can try to create an android example when I have time after work, I'm assuming its just some config issues since I dont think this should cause any new issues Stride didnt already have.

from stride.

VaclavElias avatar VaclavElias commented on May 27, 2024

I have no idea but toolkit is not using a regular Stride project configuration file, that means, Stride will skip certain if conditions in the Stride code base, which might initiliaze certain things? I had some problem with Bepu Physics (or Bullet), where I had to set something through the code related to Physics to access and set certain things because code only is not using configuarion file (at the moment).

If it is this case, it might be easy to find out, but one would need to debug Stride code with the example above and then it might be easty to initilize whatever is missing manually or we would need to put our heads together and find out what needs to be done in Stride code base itself :)

Toolkit, code only part is still trying to figure out, what needs to be initiliazed so all works the same like from a regular Stride project 🤣. And it started from nothing and adding whatever is needed, whatever we find on the way..

from stride.

MeharDT avatar MeharDT commented on May 27, 2024

Nice work @Basewq! Are you working on a PR for this? If not I can create one.

As per the note directly above, it says "Important: Please keep in sync with Stride.Core.PostSettings.Dependencies.Targets"
however I don't know the full extent of what needs to be sync'd (eg. just change CopyLocal to ReferencePath.CopyLocal & ReferenceDependencyPaths.CopyLocal or maybe copy-paste all six lines?)

Tagging @xen2 because this change was made in PR #1616, how in sync do we need to keep the two files?

from stride.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.