Jump to content

Echo 8 ÉRÀ

Members
  • Posts

    60
  • Joined

  • Last visited

Reputation

0 Neutral

Profile Information

  • About me
    Rocketry Enthusiast
  1. I just hope it runs well on Wine. I use FreeBSD for my desktop, so while I'd love to see a native port, realistically it'll never happen.
  2. The Unity scripting documentation talks about Javascript, which does have a .Net implementation.
  3. Not to my knowledge. You could always try to track down a version of J# and see if that works, though the way it seems to require J# specific runtime DLLs, I seriously doubt it would work.
  4. Or you could just use MSBuild Tasks and accomplish the same thing without the hassle of dealing with batch files:
  5. A collection is only considered to have been modified after an element is added/removed from it. I'm not sure what replacing an element without changing the collection size is considered though. EDIT: For List<T>, replacing an element qualifies as modifying it.
  6. Well, there's your problem. Portable class libraries are there if you want to create a class library that supports desktop, metro-style desktop apps, Windows Phone apps, Silverlight. etc., and as a consequence, require a minimum level of .Net 4.0 (I think that's minimum metro apps support). Just recreate the project, except pick the non-portable Class Library project type.
  7. I think only SDKs show up in the Programs and Features control panel applet (the "uninstall programs" tool I think you are referring to): S/he's also mentioned enabling it in the control panel, which presumably means the little dialog that appears if you click "Turn Windows features on or off". Hmm. Maybe they should check if .NET 3.5 is actually installed by checking if the folder actually exists: C:\Windows\Microsoft.NET\Framework\v3.5
  8. The quick and dirty way of forcing VS to target a specific version of the .NET Framework is to open your *.csproj file in Notepad and change the line that reads <TargetFrameworkVersion>vx.y</TargetFrameworkVersion> where x.y is the .NET Framework version.
  9. Despite not being able to read your log file, since that's not a proper link, I'm going to take a guess and say that your project is targeting the .Net 4.x framework and contains references to DLLs that don't come with KSP.
  10. If you can display a string, you can display a number. String.Format() is your friend.
  11. Just for kicks, I tried to write your nested foreach loops (with KSPAddon instead of your attribute) with LINQ instead: private void FindAllCrewDataGenerators() { var generators = from type in ( (from asm in AssemblyLoader.loadedAssemblies select asm.assembly.GetTypes().AsEnumerable()) .Aggregate((first, second) => first.Concat(second))) where Attribute.IsDefined(type, typeof(KSPAddon)) select type; this.Generators = generators.ToList(); } The nested loops is more efficient and easier to understand, IMO.
  12. As for your case of using .Net 3.5 but finding no types, it might be a case of AssemblyLoader.loadedTypes not being populated with what you think it is. At least in the flight scene for me, AssemblyLoader.loadedTypes just contains Part, Partmodule, InternalModule and ScenarioModule.
  13. I'm going to have to investigate this at some point. LINQ in KSP plugins, that is. While I haven't used LINQ itself, I have used the same classes and methods that LINQ is built on with no problems. EDIT: Ippo, would you mind posting a zip containing your project which crashes KSP? My quick and dirty test plugin loads fine, so I don't know if it's because the code is too trivial to trigger any problems or if I set project settings out of habit which allow me to use LINQ without any problems.
  14. Why can't you use LINQ AND target .Net 3.5 at the same time? I don't have a handy C# project to test with, but I compiled and ran the following C++/CLI code just fine: using namespace System::Linq; bool attfilter(System::Type ^t); bool attfilter(System::Type ^t) { return System::Attribute::IsDefined(t, KSPAddon::typeid); } void Events::Start(void) { PDebug::Log("Events::Start()"); auto generators = Enumerable::Where(AssemblyLoader::loadedTypes, gcnew System::Func<System::Type ^, bool>(&attfilter)); auto Generators = Enumerable::ToList(generators); for each (auto g in Generators) { PDebug::Log(g->FullName); } }
×
×
  • Create New...