Skip to content
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

C#: automatic generation of a project file? #41

Closed
GreyCat opened this issue Oct 28, 2016 · 3 comments
Closed

C#: automatic generation of a project file? #41

GreyCat opened this issue Oct 28, 2016 · 3 comments
Assignees

Comments

@GreyCat
Copy link
Member

GreyCat commented Oct 28, 2016

While adding yet another test, I've finally got tired of adding all the required stuff manually to a C# project file, so I thought - why don't we just make some sort of .csproj file generator? From what I see now, it should just:

  • take a template
  • add compiled/csharp/*.cs stuff into second Project/ItemGroup in the following way:
    <Compile Include="..\..\..\compiled\csharp\ZlibWithHeader78.cs">
      <Link>compiled\ZlibWithHeader78.cs</Link>
    </Compile>
  • add tests/*.cs to the same location in the following way:
    <Compile Include="tests\SpecZlibWithHeader78.cs" />
  • add src/* to the third Project/ItemGroup in the following way:
    <None Include="..\..\..\src\zlib_with_header_78.bin">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      <Link>src\zlib_with_header_78.bin</Link>
    </None>

and, probably, that's all. Unless there is a simpler way to automate it, can I just hack some sort of quick script to generate this file? All our scripts so far are in either UNIX shell or Ruby — would it be ok to use it there as well?

@LogicAndTrick
Copy link
Collaborator

Now that partial compilation is supported by the test runner, it's probably possible to put the wildcard includes back into the project so it just includes everything in the folder. I'll give it a try.

LogicAndTrick added a commit to kaitai-io/kaitai_struct_tests that referenced this issue Oct 29, 2016
@LogicAndTrick
Copy link
Collaborator

Ok that's done and it works in VS and CI. It failed on my Windows Bash shell but I assume it's something wrong with my environment because Travis isn't complaining.

@GreyCat
Copy link
Member Author

GreyCat commented Oct 29, 2016

Thanks! That was really fast :)

@GreyCat GreyCat closed this as completed Oct 29, 2016
krisutofu pushed a commit to krisutofu/kaitai_struct that referenced this issue Jan 2, 2022
Document exact Python versions supported by KSC and runtime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants