Skip to content

Add c sharp source #2

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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

karensmiley
Copy link
Contributor

@karensmiley karensmiley commented Aug 4, 2016

I'm doing a bit of testing here before committing to the main MESA repo.

@Dennis-Brandl or @JoeDo, could one of you kindly try getting the Source files, and see if KPI-ML\Source\Csharp\MESA.KPIML\KPI-ML.sln builds correctly for you (other than the D:\NuGets\ reference)? Thanks!

Also, please take a look at the .EAP model file I used in Oct. 2015 to generate the original code:

  • A main question is on the referencing by IDs, e.g. where one KPI_Definition incorporates a second one by reference to its ID. The code generation did not interpret it as a list of IDs, but rather as a list of embedded KPI_Definition objects; likewise for KPI_Instance and KPI_Value. That seems unwieldy and not the intent of the model.
  • Another question is on how a KPI_Definition references a KPI_Instance or vice versa. With the current EAP structure and tool conversion, a KPI_Definition would have to know (embed the IDs of) the many possible KPI_Instances which are based on it. This seems illogical, as well as undesirable from a version control viewpoint.

These may be misunderstandings on my part, or simple issues with how the EAP->C# conversion tool works, or with naming of the references.

K added 10 commits July 6, 2016 17:54
…e adjustments for implementation practicalities and concerns. Goal is to serve as basis for discussion among XML Committee before committing these source files to MESA repo.
See pull request for discussion of issues on it.
@JoeDo
Copy link
Member

JoeDo commented Aug 5, 2016

Hi Karen,

Below is the output I received from trying to build the solution. It looks like the NuGet.exe reference isn't valid, but the other projects seem to build okay.

1>------ Build started: Project: KPIML.Cs, Configuration: Release Any CPU ------
2>------ Build started: Project: KPIML.Cs_Helpers, Configuration: Release Any CPU ------
2>  KPIML.Cs_Helpers -> C:\Users\dolivoj\Downloads\KPI-ML-addCSharpSource\KPI-ML-addCSharpSource\Source\Csharp\MESA.KPIML\KPIML_Helpers\bin\Release\MESA.KPIML.Cs_Helpers.dll
1>  KPIML.Cs -> C:\Users\dolivoj\Downloads\KPI-ML-addCSharpSource\KPI-ML-addCSharpSource\Source\Csharp\MESA.KPIML\KPIML\bin\Release\MESA.KPIML.dll
3>------ Build started: Project: KPIML.NuGet.Packager, Configuration: Release Any CPU ------
3>  KPIML.NuGet.Packager -> C:\Users\dolivoj\Downloads\KPI-ML-addCSharpSource\KPI-ML-addCSharpSource\Source\Csharp\MESA.KPIML\KPIML.NuGet.Packager\bin\Release\KPI-ML.NuGet.Packager.dll
3>   
3>  NuGet Packager 2.0.3
3>  Set-ItemProperty : Cannot find path 'C:\Users\dolivoj\Downloads\KPI-ML-addCSharpSource\KPI-ML-addCSharpSource\Source\Cs
3>  harp\MESA.KPIML\KPIML.NuGet.Packager\NuGet.exe' because it does not exist.
3>  At C:\Users\dolivoj\Downloads\KPI-ML-addCSharpSource\KPI-ML-addCSharpSource\Source\Csharp\MESA.KPIML\KPIML.NuGet.Packag
3>  er\NuGetPackage.ps1:256 char:1
3>  + Set-ItemProperty NuGet.exe -Name IsReadOnly -Value $false
3>  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3>      + CategoryInfo          : ObjectNotFound: (C:\Users\dolivo...kager\NuGet.exe:String) [Set-ItemProperty], ItemNotFo 
3>     undException
3>      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetItemPropertyCommand
3>   
3>   
3>  Build Exit Code: 1
3>C:\Users\dolivoj\Downloads\KPI-ML-addCSharpSource\KPI-ML-addCSharpSource\Source\Csharp\MESA.KPIML\KPIML.NuGet.Packager\NuGet.log : error : Encountered error(s) when creating package.
3>C:\Users\dolivoj\Downloads\KPI-ML-addCSharpSource\KPI-ML-addCSharpSource\Source\Csharp\MESA.KPIML\KPIML.NuGet.Packager\NuGet.log : error : Check the NuGet.log file for details.
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

@karensmiley
Copy link
Contributor Author

karensmiley commented Aug 5, 2016

Thanks, Joe. That isn't actually the error I was expecting - I was hoping the NuGet.Packager project would fetch its own latest NuGet.exe and run the project to create the MESA.KPIML NuGet package. I can check in the .exe I've been using, for now, but it would be better to make the project fetch it from NuGet. I'll try tweaking the NuGet.targets file and see if that does the trick.

… the NuGet packaging build to work without checking in a NuGet.exe.

Also added some unit tests (getting NUnit via NuGet was actually helpful in solving the packaging, too).
Cleaned up the base code and flattened the _Time_Range classes.
Added GitHub URL in comments in all .cs source files.
@karensmiley
Copy link
Contributor Author

@JoeDo, I've pushed some new updates to the branch. See if it all works for you now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants