Start a new topic

Something changed... My Duo Libraries No Longer create .js

I love the new update.... But what did you guys do to libraries... I know you guys are pushing for folks to use shared projects... but i need libraries for my toolkit.

I had a DuoCode Library project that i reference from my main project.

With the (pre dcc.exe 0.6) when i built my main project, there would be a .js

file for the duo code dll that was referenced...

Now there is NO .js file for the library project... 

Where is my .js file?

You know, the more i think about it... if you at least put the (AjaxList.cs stuff and Just the INotify from AJaxModel.cs) Collection<T>, ObserverableCollection, The INotifyXXXXXChange stuff the various System.Collection.XXXXX namespaces... You could then literally copy your WPF and Silverlight Model and ViewModel code  to your Pure C# Html DuoCode Port (If you happen to be trying to go all html5 instead of using the Silverlight plugin which is going to die in 2020)

Forgot to mention these two classes... Just to at least maintain a compatablity with standard .net class...

Both mono and .net support the these base classes (along with the Collection stuff in AjaxList.cs):

namespace System.Windows.Input


 public interface ICommand


  event EventHandler CanExecuteChanged;

  bool CanExecute(object parameter);

  void Execute(object parameter);



namespace System.ComponentModel


 public interface INotifyPropertyChanged


  event PropertyChangedEventHandler PropertyChanged;


 public class PropertyChangedEventArgs : EventArgs


  private readonly string propertyName;

  public PropertyChangedEventArgs(string propertyName)


   this.propertyName = propertyName;


  public virtual string PropertyName


   get { return propertyName; }



 public delegate void PropertyChangedEventHandler(object sender, PropertyChangedEventArgs e);


Example ViewMode:

public class TestViewModel : ViewModelBase


  /// <summary>

  /// The is valid.

  /// </summary>

  private bool _IsValid = false;

  public bool IsValid {

   get { return _IsValid; }

   set { _IsValid = value;




  /// <summary>

  /// Gets the test command.

  /// </summary>

  /// <value>The test command.</value>

  public ViewModelCommand TestCommand { get; private set; }

  /// <summary>

  /// Initializes a new instance of the <see cref="TestMe.TestViewModel"/> class.

  /// </summary>

  public TestViewModel()


   _IsValid = false;

   TestCommand = new ViewModelCommand(DoTestCommand);


  /// <summary>

  /// Dos the test command.

  /// </summary>

  /// <param name="property">Property.</param>

  public void DoTestCommand(object property)


   System.Console.WriteLine("Running Test Command!!!");  



Just a little test of PropertyChanged Event and ICommand

System.Console.WriteLine("Hello World!");

   TestViewModel MyViewModel = new TestViewModel();

   MyViewModel.PropertyChanged += (object sender, PropertyChangedEventArgs e) => {

    System.Console.WriteLine("Property Changed: " + e.PropertyName);


   MyViewModel.IsValid = true;


DuoCode Development team... Attached are a couple of classes i used to make Mvvm.

the AjaxList.cs basically adds Collection<T> and ObservableCollection classes to the framework itself.

the allow the Mvvm stuff to be compatible with native ViewModel (Xamarin.Forms, WPF and Silverlight style XAML based Mvvm) which is in the AjaxModel.cs.

You may at least consider adding (AjaxList.cs) the Collection<T> and ObservableCollection to your mscorelib base runtime. I duuno... take a look a the .cs files and let me know what you think.

(4.76 KB)
(8.62 KB)

The new DuoCode.targets file WORKS PERFECT on Xamarin Studio. i am now FULLY working

with my toolkit using C# for html doing stuff like cross-platform AJAX-RPC services and my new Ajax.Gateway.Mvvm lightweight framework (now thanks to DuoCode, also fully cross-platform) that supports things like:

- ObservableObject base class (full System.ComponentModel.INotifyPropertyChanged support)

- ObservableCollection  (full System.Collections.Specialized.INotifyCollectionChanged support)

Also implemented : System.Windows.Input.ICommand

class ModelBase : ObservableObject

class ViewModelBase : ObservableObject

class ViewModelCommand : ICommand

That gives me all the building blocks i need to make Shared Project (shared between DuoCode Html, and any other .net project including full support for XAML Binding on native clients... and traditional style load and save views for NON-XAML client... plus you could always Handle the PropertyChanged event and roll out your own html widget binding system...which im going to do)

Shared Projects!!! Kool Stuff!!!

Anyways... You guys are the "THE SHIT"

Note: Where i am from, "THE SHIT", in that context, is a REALLY GOOD THING :-)

Try this file, it should fix the XBuild CopyLocal bug.

Put it (Overwite) in packages\DuoCode\build folder.

Thanks for reporting this bug.

We verified and reproduced it here, it's XBuild issue only. Using MSBuild it works fine.

The problem is somehow XBuild refuses to CopyLocal your reference additional files (.js +

As a workaround I suggest to add the `missing_library.js` as a "Link" to your Duo project and select `CopyLocal=true` on it, for sure it will be copied by XBuild.

I STILL AM A VERY HAPPY CAMPER... Great Work On Everything DuoCode Developers :-)

That Kool With Full Xamarin Support Coming... For now, even using xamarin (i have a custom toolkit that creates xamarin projects for me now... works great...) I will just manually put the AjaxGateway.Duo.js file in my script folder (or use a shared project... the main project builds fine)

Take a look


Oh, in that case, we're still working on full Xamarin Studio support.

We've made our compiler runnable on mono, but right now we're only supporting building it with xbuild  from the command line.

We're still developing full Xamarin Studio integration...

This is on Xamarin Studio... I will make a Visual Studio Project and check out

That doesn't sound right... First, make sure all the projects are updated to the latest DuoCode compiler: go to NuGet Package Manager, and update it to the latest version (0.6.1251.0) - select 'include pre-release' in the NuGet dialog.

Then, just to make extra sure, restart your Visual Studio (to make sure all loaded assemblies have been updated)

Try building again, and let us know if it solves it?

Login or Signup to post a comment